Most todays smartphones do not rotate the picture in a file but just store an information what the correct rotation is. Modern image viewers (macOS preview or photos app for example) read this stored information and show the picture in the correct rotation.
When such a picture is imported to Confluence (in a page or a comment) it's displayed in wrong rotation. It would be nice to have Conflunce "understand" those files and display them corretly.