You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My apologies in advance if this is not an issue with sharp, though it seems to be either that or configuration, and since I'm not familiar with sharp I thought it would be prudent to ask here, so that I may be directed towards the responsible vendor/package with more info on what's going wrong. I've already looked into libheif, and it seems that the issue does not lie there (see strukturag/libheif#1259). The relevant immich configuration also seems to me to be correct (https://github.com/immich-app/immich/blob/376282e538becf6887504965ac8b3f02ec3389b9/server/src/services/media.service.ts#L202).
What are the steps to reproduce?
Grab heic image with the following dimensions: (200 MP 12240 x 16320 4 MiB).
Setup immich using the dockerfile (easy config for reproducing the issue, I already took the step of updating sharp to the latest version manually and that doesn't solve the issue).
Then I get this:
2025-02-19 23:43:02 [Nest] 7 - 02/19/2025, 11:43:02 PM ERROR [Microservices:JobService] Error: heif: Unsupported feature: Unsupported color conversion (4.3003)
2025-02-19 23:43:02 at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)
2025-02-19 23:43:02 at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:54:68)
2025-02-19 23:43:02 at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:164:63)
2025-02-19 23:43:02 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2025-02-19 23:43:02 at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:114:25)
2025-02-19 23:43:02 at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:148:28)
2025-02-19 23:43:02 at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:130:13)
2025-02-19 23:43:02 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
2025-02-19 23:43:02 at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
What is the expected behaviour?
Thumbnail generation should work
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
I've been able to reproduce and it looks like this relates to libheif security limits (the error message is somewhat misleading).
The unlimited flag provided by sharp and libvips when opening HEIF images currently only removes the security limit on image dimensions, whereas libheif 1.19.0 onwards provides more granular control over these.
I've opened a libvips PR libvips/libvips#4398 to take advantage of this new feature. This change allows me to process the sample image provided locally without error.
Possible bug
npm install sharp
completes without error.node -e "require('sharp')"
completes without error.sharp
as reported bynpm view sharp dist-tags.latest
.sharp.cache(false)
does not fix this problem.rotate()
orkeepExif()
does not fix this problem.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?My apologies in advance if this is not an issue with sharp, though it seems to be either that or configuration, and since I'm not familiar with sharp I thought it would be prudent to ask here, so that I may be directed towards the responsible vendor/package with more info on what's going wrong. I've already looked into
libheif
, and it seems that the issue does not lie there (see strukturag/libheif#1259). The relevant immich configuration also seems to me to be correct (https://github.com/immich-app/immich/blob/376282e538becf6887504965ac8b3f02ec3389b9/server/src/services/media.service.ts#L202).What are the steps to reproduce?
Grab heic image with the following dimensions: (200 MP 12240 x 16320 4 MiB).
Setup immich using the dockerfile (easy config for reproducing the issue, I already took the step of updating sharp to the latest version manually and that doesn't solve the issue).
Then I get this:
What is the expected behaviour?
Thumbnail generation should work
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Docker container should be very easy to set up, and uploading the image should trigger this immediately with no additional setup: https://immich.app/docs/install/docker-compose/
Please provide sample image(s) that help explain this problem
Download the image in question from my share: https://mega.nz/file/r04x1DTD#X8q1hVzAPNfya_ZXizn8HPEOZRFRNRq0DaRpJyX6hwc
The text was updated successfully, but these errors were encountered: