There are several theories on why this happens .
Anyway , The Moderators spend quite a bit of time flipp'n these darn things around but it would be nice if Folk could do it themselves .
Alas there are no magic Mod buttons that we have at our disposal to do it but rather the following proceedure .
First click on the picture This will show the full size version of it . Now right click or Save Picture to your device .
If there are multiple Pics , save them one at a time . As a Moderator I even save the Pics that are the right way around incase I stuff something up
Next , you need to open an app on your device that has a picture rotating option .On a PC , I use windows "Paint". On my iphone I use a free App called "resize it" which incidentally also resizes and is handy when ever I get that annoying File too large error
Rotate the pictures and save the new copy on your device .(Make sure you rotate the copies you just saved and not the originals.)
Go back to your post and click EDIT . ....thats the Pencil Icon
Go down to attachments and delete all Pics (Click on Delete File). I recommend deleteing even the straight ones ,as other wise it can get very confusing which Pic is what when you reinstall them.
When you do this ,it will remove the attachment commands and leave a blank line in your Post text. Now add the rotated Pics and place them back into the post text by clicking the cursor on those blank lines you created above , then click the place inline button of the appropriate picture.
Note: if you don't click place inline , the pics will be posted at the end of your Text
Remember that the top attachment in the attachments list is the last Pic you added .
Submit and all should be good .
If you try and rotate the pics on your device before submitting , they will never orientate correct .So you must save the posted pic back to your device and rotate that version .