The issue lies in the fact that a camera, phone, computer, etc. can decipher the correct orientation, but the internet deciphers it exactly as the photo was taken.

Even if the original files are in the correct orientation you will need to set the orientation in Photoshop or any photo editing software, and then re-upload the photo. This will resolve any issue you may have with these photos.

Tip: Mac users can batch import photos into iPhoto and then export them. Doing so puts the photos in the correct orientation before uploading them to the photo content type.