Considering that most, if not all of us grew up in an analog world, where there was a definite up vs down, the concept of digital photography can be a bit disorienting for anyone who is only a casual user of computers. It's kind of like traveling in a spacecraft. Which way is really up?
Just like word processors, some aspects of cameras don't have defined standards that everyone follows, so software writers often circumvent their poorly written software by manipulating the incorrectly oriented image after the fact, which just makes things worse. They think they can manipulate images through software to solve every problem. The problem exists with many cameras, mostly smartphones, but the iPhone has always been notorious for orientation problems. This might be due to the fact that the iPhone has always been marketed as a portrait camera. You might be able to get around the problem by installing a 3rd party camera app rather than using the default app that comes with the camera.
If all software was written properly, the bottom of the image would always be the bottom when the photo was saved. But some cameras don't change the orientation of the image sensor's axis when you rotate your camera. The software merely edits the Exif data to show that the image was rotated. That creates a ton of problems as the OP has found. This scheme relies on the assumption that all software will open the image, read the Exif data and rotate the image.
To make matters worse, not all image editing software is created equal. Some are written as poorly as the camera software. Basic editors only rotate the image and edit the Exif data. That is not true editing. This scheme makes it look correct on your computer, but doesn't make it universally correct on all software, including the web, because it is still a rotated image. Sometimes it solves the problem, and sometimes it doesn't.
Editing an image's orientation involves actually redrawing the picture to match what is being displayed, and then deleting the Exif orientation data, or re-writing it as bottom-bottom. Even the most basic image viewer will always open this image correctly, because it can be displayed in its native orientation without manipulation. Learn how to open an image's metadata properties to find out what your software is doing when it rotates an image.
Irfanview was mentioned earlier. This is a great, true photo editor, for both beginners and experts, and it is free, without ads or malware as long as you download it direct from Irfanview. It is easy to learn, and fairly powerful.
Some photo software is designed to be a viewer, and others are primarily editors. Most try to be both, which is not really possible. I always install two photo applications on my computers. One is a viewer, which is set as the default, and the other is a true editor.
Barring all that, if you don't want to mess around with editing or installing different camera software, the only solution is to learn what the native orientation is for the camera you are using, and stick with it. In that way, you will always be guaranteed that your images will come out correctly.
Last edited by Sparky57; 03-20-2017 at 08:10 AM.