It looks like when taking an HDR photo from an iOS device, because Apple doesn't rotate images and shoots them all in landscape, there's EXIF metadata (orientation in specific) that tell other software how to present that photo.
The weirdness happens when someone attempts to send/share/use/upload a resized version of the original HEIC image taken by the iPhone camera.
That OS resizing tool messes up the precious EXIF orientation metadata, and therefore we're left with an image that's not rotated and doesn't contain any metadata for actually presenting it properly.
We have a php server that receives such photos uploaded from people, and many of them complain about uploading resized photos through a webview and getting a messed up orientation.
Not sure how to fix this, considering that the photos we end up with have an exif orientation value of 1 (which means no orientation needed) - curtesy of that iOS resizing tool (even if before getting resized the image had an exif orientation value of 6)?
https://drive.google.com/file/d/168ZxbXI0IFofoTr7pPDOULtE-VO7HcVC/view?usp=sharing
Couldn't find a way to actually share the original HEIC image, so I just shared the output of the Actual Size option (image00006) and the Small option (image00001). The finger in the example photo is always pointing towards the ceiling, and the orientation of the iPhone while taking the photo was portrait.