You have to rotate it before you upload it. If it is in the right position in your library, it's a weird thing that happens sometimes. Turn it a quarter turn and try uploading it again.
I went to my phone gallery and rotated 90 degrees then reserved to gallery. I tried uploading and it goes back to the current orientation or 180 degrees from what it is. I went thru gallery changing for every 90 degree orientation but every upload only allowed the sideward one way or the other. I could not even get upload to post upside down