My Angular application allows users to choose a profile picture. During testing, I discovered that when I upload images from an iPhone in portrait mode, they appear rotated in my app. However, when the photos are taken in landscape mode, they display correctly. On the other hand, testing the same scenario on an Android device shows that images appear correctly in both portrait and landscape modes. I want to know how to prevent this rotation behavior, as I want all images to be displayed without any rotation. Here is an example illustrating the issue:
https://i.sstatic.net/2tnyv.png
All uploaded images should be displayed like this:
https://i.sstatic.net/gEPeE.png
I have verified that the files uploaded from iOS are not physically rotated on the server. The problem seems to be related to how the images are visualized within the app.
What steps should I take to ensure that images are always displayed without rotation in my Angular application?
I have created a stackblitz to showcase the implementation of this component:
Any assistance in addressing this issue and explaining the cause of this strange behavior would be greatly appreciated.
Thank you!