Yup, what Bill said. The image isn't actually being rotated by Confluence, it's being rotated (based on the EXIF information) by everything else you're viewing the image with, and these days pretty much every desktop app will obey that rotation, as are an increasing number of web applications.
Your best bet is to export the image from whatever image editing software you have available. Even basic things like Preview (OSX) or Paint (Windows) should let you do it. A tiny resize or image quality change is usually enough to fix it.
Have a look at the following plugin: https://marketplace.atlassian.com/plugins/com.celestecs.confluence.image-lossless-rotator.
It rotates images lossless, which means the image quality and file size are not changed. Additionally it can rotate images based on EXIF orientation tag.
I believe that is what you need.
👋 Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with im...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events