Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple iOS 18 HEIC images fail to load completely #965

Open
rhatguy opened this issue Jan 2, 2025 · 2 comments
Open

Apple iOS 18 HEIC images fail to load completely #965

rhatguy opened this issue Jan 2, 2025 · 2 comments

Comments

@rhatguy
Copy link

rhatguy commented Jan 2, 2025

Describe the bug
Apple HEIC images shot on iPhone 16 Pro max running iOS 18.2 are failing to display completely. Thumbnail or full size images are both broken. I have other HEIC images working in this instance, so I know HEIC is working in general, but something must be different about these new HEIC files.

Photo/video (optional) that causes the bug
Will attach test images. This image is free to use as a test case if desired.

Screenshots (optional)
Can provide screenshots if needed, but images fail to display completely so pages are just blank.

Server logs (optional)
1/2/2025, 10:58:25 AM[VERBS] GET / 200 122ms
1/2/2025, 10:58:26 AM[ERROR] ErrorDTO {
code: 32,
message: 'Error during generating thumbnail: /app/data/images/2025/ZZZZ/IMG_0308.HEIC',
details: 'Error: Input file has corrupt header: /app/data/images/2025/ZZZZ/IMG_0308.HEIC: bad seek to 6951886\n' +
'heif: Invalid input: Unspecified: Too many auxiliary image references (2.0)\n',
request: { method: '', url: '' }
}

Environment (please complete the following information):
Server running docker image bpatrik/pigallery2:edge-alpine build from 10/27/24 on unraid.
HEIC is added to supported photo formats.
Client is MacBook Pro M4 running safari and chrome.

@rhatguy
Copy link
Author

rhatguy commented Jan 2, 2025

@rhatguy rhatguy changed the title Apple HEIC images fail to load completely Apple iOS 18 HEIC images fail to load completely Jan 2, 2025
@rhatguy
Copy link
Author

rhatguy commented Jan 2, 2025

Updated the title to reflect this seems to be specific to iOS 18. Apple seems to have changed the format of the pictures in newer iOS versions, and this even affects older model phones that upgrade to iOS 18.

This appears to have been an issue with immch also a few months back - immich-app/immich#10464

Support appears to have been added to libheif in version 1.18.0 - strukturag/libheif#1190

libVIPS appears to have fixed the issue around Sept '24 - libvips/libvips#4169

Does this mean we'll need a new version of sharp to pull all this into PiGallery2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant