Description
Possible bug
- Running
npm install sharp
completes without error. - Running
node -e "require('sharp')"
completes without error. - I am using the latest version of
sharp
as reported bynpm view sharp dist-tags.latest
. - Adding
sharp.cache(false)
does not fix this problem. - Using
rotate()
orkeepExif()
does not fix this problem.
What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?
System:
OS: Linux 5.15 Debian GNU/Linux trixie/sid
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Memory: 53.78 GB / 62.72 GB
Container: Yes
Shell: 5.2.15 - /bin/bash
Binaries:
Node: 22.13.1 - /usr/local/bin/node
Yarn: 1.22.22 - /usr/local/bin/yarn
npm: 10.9.2 - /usr/local/bin/npm
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
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
Activity