I've had the same thing happen when I've uploaded photos from my computer that were taken on my phone. I believe some camera orientation info is saved in the EXIF data and your computer is rotating for you.

I was able to fix it by rotating the images on my computer left then right and then saving them. The proper viewing orientation seems to stick with the picture at that point after being uploaded.