Is it a cell phone picture?
I've noticed some can be sideways or upside down, because of the save settings on the phone.
If I save my photos 'flipped', they are right side up, but if the flipped setting is off, they can be in any direction when uploaded.
The easiest thing would be to rotate the photo and save it before uploading. If that doesn't work, chances are the EXIF data is saved with the photo. The only way to fix it is to save a flipped copy on the phone, or remove the EXIF.