Images backed up from iOS don't keep correct orientation #2469

Open
opened 2026-02-20 01:12:13 -05:00 by deekerman · 18 comments
Owner

Originally created by @j-peeters on GitHub (Mar 29, 2024).

Originally assigned to: @mertalev on GitHub.

The bug

Backup photos to my private immich server (which is running on Unraid in the community Immich docker) don't keep their orientations compared to how they are displayed in the Immich app.
In the iOS Immich app, all pictures show in the right orientation.
IMG_3929

On the web UI though, most photos are not shown in the same way:
20240329 Photos - Immich

I've uploaded the photos through a Cloudflared tunnel from my iPhone to my server. As far as I know this is an encrypted tunnel and no metadata is stripped.

I have run the extract metadata post upload but that didn't help.
Thanks for any ideas. I'd love to help troubleshoot this but some info below is lacking because of limited knowledge of docker. (the reason I use Unraid ;-))

The OS that Immich Server is running on

Unraid 6.12.9

Version of Immich Server

1.100.0

Version of Immich Mobile App

1.100.0 build 146

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

I have no idea where to find this info in Unraid. If someone can help me locate it I'll post it. Thanks.

Your .env content

I have no idea where to find this info in Unraid. If someone can help me locate it I'll post it. Thanks.

Reproduction steps

1.start a backup from iOS app
2.view images in Immich server

Additional information

No response

Originally created by @j-peeters on GitHub (Mar 29, 2024). Originally assigned to: @mertalev on GitHub. ### The bug Backup photos to my private immich server (which is running on Unraid in the community Immich docker) don't keep their orientations compared to how they are displayed in the Immich app. In the iOS Immich app, all pictures show in the right orientation. ![IMG_3929](https://github.com/immich-app/immich/assets/4502360/d79d89ce-2e01-416c-9e4b-a6538e2b6e3f) On the web UI though, most photos are not shown in the same way: ![20240329 Photos - Immich](https://github.com/immich-app/immich/assets/4502360/16a72559-5ff9-457b-a765-5949e2ee0423) I've uploaded the photos through a Cloudflared tunnel from my iPhone to my server. As far as I know this is an encrypted tunnel and no metadata is stripped. I have run the extract metadata post upload but that didn't help. Thanks for any ideas. I'd love to help troubleshoot this but some info below is lacking because of limited knowledge of docker. (the reason I use Unraid ;-)) ### The OS that Immich Server is running on Unraid 6.12.9 ### Version of Immich Server 1.100.0 ### Version of Immich Mobile App 1.100.0 build 146 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML I have no idea where to find this info in Unraid. If someone can help me locate it I'll post it. Thanks. ``` ### Your .env content ```Shell I have no idea where to find this info in Unraid. If someone can help me locate it I'll post it. Thanks. ``` ### Reproduction steps ```bash 1.start a backup from iOS app 2.view images in Immich server ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 29, 2024):

Can you share this picture for troubleshooting?
image

@alextran1502 commented on GitHub (Mar 29, 2024): Can you share this picture for troubleshooting? ![image](https://github.com/immich-app/immich/assets/27055614/37bd81b9-83e8-4a09-b360-e234409151e6)
Author
Owner

@j-peeters commented on GitHub (Mar 29, 2024):

Of course, here is the file. It is the original, a HEIC file (the now default file format for photos in iOS).
If I export it from Apple Photos as a JPEG it exports the image with the correct orientation. So the embedded EXIF data get normalized. I hope this file is workable. Thanks for looking into this!

Orientation data in HEIC:
Orientation: Rotate 180

Orientation data in JPEG:
Orientation: Horizontal (normal)

IMG_3925.HEIC.zip

@j-peeters commented on GitHub (Mar 29, 2024): Of course, here is the file. It is the original, a HEIC file (the now default file format for photos in iOS). If I export it from Apple Photos as a JPEG it exports the image with the correct orientation. So the embedded EXIF data get normalized. I hope this file is workable. Thanks for looking into this! Orientation data in HEIC: `Orientation: Rotate 180` Orientation data in JPEG: `Orientation: Horizontal (normal)` [IMG_3925.HEIC.zip](https://github.com/immich-app/immich/files/14805766/IMG_3925.HEIC.zip)
Author
Owner

@azhiltsov commented on GitHub (Apr 2, 2024):

I Have just installed the Immich on Unraid and observing the same issue with some of my photos (mostly selfies).
Please let me know if I can help with troubleshooting.

@azhiltsov commented on GitHub (Apr 2, 2024): I Have just installed the Immich on Unraid and observing the same issue with some of my photos (mostly selfies). Please let me know if I can help with troubleshooting.
Author
Owner

@scrampker commented on GitHub (Apr 7, 2024):

A simple rotate/crop tool would really help with similar issues.

@scrampker commented on GitHub (Apr 7, 2024): A simple rotate/crop tool would really help with similar issues.
Author
Owner

@j-peeters commented on GitHub (Apr 14, 2024):

Hi @alextran1502 did the images I shared give an indication as to why Immich is displaying them with the wrong rotation? Thanks.

@j-peeters commented on GitHub (Apr 14, 2024): Hi @alextran1502 did the images I shared give an indication as to why Immich is displaying them with the wrong rotation? Thanks.
Author
Owner

@alextran1502 commented on GitHub (Apr 14, 2024):

@j-peeters Hello; I did look at the orientation info extracted from the photo and I don't see anything abnormal to other images. At the moment, I haven't figured out the cause yet. We might need to look into updating the dependency such as Sharp to see if it help generating the correct orientation

@alextran1502 commented on GitHub (Apr 14, 2024): @j-peeters Hello; I did look at the orientation info extracted from the photo and I don't see anything abnormal to other images. At the moment, I haven't figured out the cause yet. We might need to look into updating the dependency such as Sharp to see if it help generating the correct orientation
Author
Owner

@j-peeters commented on GitHub (Apr 14, 2024):

Thanks for the update @alextran1502 hopefully an updated Sharp will fix it. Would love to use this fabulous service. Thanks for your time and effort!

@j-peeters commented on GitHub (Apr 14, 2024): Thanks for the update @alextran1502 hopefully an updated Sharp will fix it. Would love to use this fabulous service. Thanks for your time and effort!
Author
Owner

@frejaya commented on GitHub (Apr 23, 2024):

Also experiencing this issue

@frejaya commented on GitHub (Apr 23, 2024): Also experiencing this issue
Author
Owner

@j-peeters commented on GitHub (Jun 13, 2024):

Hi @alextran1502, I'm eager to start using Immich, so I wonder if you have had time to see if an updated dependency solves the orientation issue? Thanks.

@j-peeters commented on GitHub (Jun 13, 2024): Hi @alextran1502, I'm eager to start using Immich, so I wonder if you have had time to see if an updated dependency solves the orientation issue? Thanks.
Author
Owner

@jrasm91 commented on GitHub (Sep 9, 2024):

Turns out HEIF exif is a bit weird and rotation is intentionally ignored by vips. I think it isn't actually in the spec for HEIF.

@jrasm91 commented on GitHub (Sep 9, 2024): Turns out HEIF exif is a bit weird and rotation is intentionally ignored by vips. I think it isn't actually in the spec for HEIF.
Author
Owner

@j-peeters commented on GitHub (Sep 10, 2024):

Turns out HEIF exif is a bit weird and rotation is intentionally ignored by vips. I think it isn't actually in the spec for HEIF.

Thanks for the comment @jrasm91. Do you think that you could implement something in Immich that helps show images (and add I understand videos) in the orientation in which they were taken? Because otherwise it's not a great way to view your material if it's shown upside down or sideways. Curious to read what you think.

@j-peeters commented on GitHub (Sep 10, 2024): > Turns out HEIF exif is a bit weird and rotation is intentionally ignored by vips. I think it isn't actually in the spec for HEIF. Thanks for the comment @jrasm91. Do you think that you could implement something in Immich that helps show images (and add I understand videos) in the orientation in which they were taken? Because otherwise it's not a great way to view your material if it's shown upside down or sideways. Curious to read what you think.
Author
Owner

@jrasm91 commented on GitHub (Sep 10, 2024):

Yeah I was considering adding something in immich to basically always use the rotation from exif if available.

@jrasm91 commented on GitHub (Sep 10, 2024): Yeah I was considering adding something in immich to basically always use the rotation from exif if available.
Author
Owner

@j-peeters commented on GitHub (Sep 10, 2024):

Yeah I was considering adding something in immich to basically always use the rotation from exif if available.

That's really great. Looking forward to it! Thanks in advance.

@j-peeters commented on GitHub (Sep 10, 2024): > Yeah I was considering adding something in immich to basically always use the rotation from exif if available. That's really great. Looking forward to it! Thanks in advance.
Author
Owner

@mertalev commented on GitHub (Sep 10, 2024):

From what I understand, rotation is handled as a HEIF transformation, so the EXIF orientation is supposed to just be informational. If you rotate based on the tag, you'll have double rotated the image. I think the issue in this case is that the image has an EXIF tag, but (incorrectly) doesn't have a transformation to rotate it.

@mertalev commented on GitHub (Sep 10, 2024): From what I understand, rotation is handled as a HEIF transformation, so the EXIF orientation is supposed to just be informational. If you rotate based on the tag, you'll have double rotated the image. I think the issue in this case is that the image has an EXIF tag, but (incorrectly) doesn't have a transformation to rotate it.
Author
Owner

@TheRedCyclops commented on GitHub (Nov 19, 2024):

I'm having a very similar issue, in the app it seems to recognize the EXIF orientation and it correctly orients the picture. But on the web interface it does not, even when rotated in the app

@TheRedCyclops commented on GitHub (Nov 19, 2024): I'm having a very similar issue, in the app it seems to recognize the EXIF orientation and it correctly orients the picture. But on the web interface it does not, even when rotated in the app
Author
Owner

@dionorgua commented on GitHub (Jan 23, 2025):

KDE Gwenview, GIMP displays same picture incorrectly.
Digikam is OK

@dionorgua commented on GitHub (Jan 23, 2025): KDE Gwenview, GIMP displays same picture incorrectly. Digikam is OK
Author
Owner

@kalix123 commented on GitHub (May 17, 2025):

Any updates on this? I just discovered immich and would like to keep using it. But this features makes a lot of my photos rotated the wrong way.

@kalix123 commented on GitHub (May 17, 2025): Any updates on this? I just discovered immich and would like to keep using it. But this features makes a lot of my photos rotated the wrong way.
Author
Owner

@SoulGit commented on GitHub (Oct 11, 2025):

Same experience here. Issue seems to occur only with images taken with a 3rd party camera app (never experienced this problem previously until I started using a new camera app last week.) Additionally, the problem extends beyond the web view: Images taken on the iPhone display correctly within Immich on the iPhone, same images are rotated left in the web UI and also when viewed on an iPad via Immich app.

Some additional info: In the instances where this occurs, the jpg has the proper orientation, the HEIC does not. It looks like the Orientation tag is present, but the Rotation tag is not, so perhaps the Immich renderer gets confused and the HEIC image doesn't get rotated properly?

@SoulGit commented on GitHub (Oct 11, 2025): Same experience here. Issue seems to occur only with images taken with a 3rd party camera app (never experienced this problem previously until I started using a new camera app last week.) Additionally, the problem extends beyond the web view: Images taken on the iPhone display correctly within Immich on the iPhone, same images are rotated left in the web UI and also when viewed on an iPad via Immich app. Some additional info: In the instances where this occurs, the jpg has the proper orientation, the HEIC does not. It looks like the Orientation tag is present, but the Rotation tag is not, so perhaps the Immich renderer gets confused and the HEIC image doesn't get rotated properly?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#2469
No description provided.