iOS portrait mode settings

I’ve started using Nextcloud and I really like the idea behind it. I noticed that when you upload image that was taken in portrait mode on my iPhone when I downloaded it back on my phone I lose the ability to do changes to the portrait settings. JPEG is disabled in the all so the images are uploaded as heic. Also portrait marker appear only if I save the photo to my gallery from “open in” menu. If I download the photo from “Save to photo gallery” there is not even a portrait marker