Photos are displayed according to the orientation information from the camera that took the photo. This can cause some photos to appear sideways or upside down.
For example, If you used a camera and held it vertically to take a photo in portrait mode, that photo can be saved sideways, in landscape mode. This can happen if the auto-rotate feature of the camera is turned off.
You can correct the orientation of the original photos using this online tool:
http://www198.lunapic.com/editor/?action=rotate
All you need to do is upload the picture and re-save it using the link below the main picture. You'll then need to re-upload the correctly rotated photos and they should then appear the right way round.
iPhone / iPad
If you're using an Apple device, you can find more information on how to take photos the correct way around here:
https://filmora.wondershare.com/mobile-editing-tips/how-to-rotate-photos-on-iphone.html