Photo rotated when loaded to Gallery in a redu

My app’s URL:
On iOS 13, when loading a photo (tab: “Carica foto”), from the iphone album, if I choose a smaller size of the photo, it is loaded rotated by 90° to the left.

I found this happening in Facebook too

I suspect it is an iOS bug