When taking a picture, the orientation of the image is not always aligned with the way your camera or your phone
Some devices save the image with the correct orientation. Some devices do nothing because they don't know their current orientation. In this case you'll have to fix the orientation manually with an image editing program.ย
Some devices don't align the image but save the orientation in the meta data (called EXIF). When such an image is viewed, it depends on the software whether the orientation information from the meta data is respected. Some web browser support this, some don't.
If you want to make sure your images are displayed correctly for everyone you have to set the correct orientation in an image editing program and remove the the orientation information from the EXIF meta data.