Error: heif: Unsupported feature: Unsupported color conversion (4.3003) #4802

Closed
opened 2026-02-05 10:53:17 +03:00 by OVERLORD · 23 comments
Owner

Originally created by @flosoft on GitHub (Nov 24, 2024).

The bug

Immich seems to have issues with the 200MP photos from my Samsung Galaxy S24.
The picture has been uploaded directly to the file storage and is mounted into Immich via an external library.

The Image that fails can be found here: https://pam.bcn.jensen.ovh/sharing/tLiM6m1xY

The OS that Immich Server is running on

Docker

Version of Immich Server

V1.121.0

Version of Immich Mobile App

V1.121.0 build.168

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /volume1/photo/:/mnt/photo:ro
      - /var/services/homes/florian/Photos:/mnt/photo-florian:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always
  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #  file: hwaccel.ml.yml
    #  service: openvino # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always
  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always
volumes:
  pgdata:
  model-cache:

Your .env content

UPLOAD_LOCATION=./library
IMMICH_VERSION=release
DB_PASSWORD=#########
DB_HOSTNAME=immich_postgres
DB_USERNAME=#######
DB_DATABASE_NAME=#######
REDIS_HOSTNAME=immich_redis

Reproduction steps

Upload image to server.
Refresh image thumbnails.
Image thumbnail generation will continue to fail.

Relevant log output

immich_server            | [Nest] 7  - 11/24/2024, 2:24:15 PM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: heif: Unsupported feature: Unsupported color conversion (4.3003)
immich_server            | [Nest] 7  - 11/24/2024, 2:24:15 PM   ERROR [Microservices:JobService] Error: heif: Unsupported feature: Unsupported color conversion (4.3003)
immich_server            |     at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)
immich_server            |     at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68)
immich_server            |     at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63)
immich_server            |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
immich_server            |     at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25)
immich_server            |     at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:151:28)
immich_server            |     at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:122:13)
immich_server            |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_server            |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_server            | [Nest] 7  - 11/24/2024, 2:24:15 PM   ERROR [Microservices:JobService] Object:
immich_server            | {
immich_server            |   "id": "85d4b07f-18cb-45e0-8a6e-f75b46a31de4"
immich_server            | }
immich_server            |


### Additional information

_No response_
Originally created by @flosoft on GitHub (Nov 24, 2024). ### The bug Immich seems to have issues with the 200MP photos from my Samsung Galaxy S24. The picture has been uploaded directly to the file storage and is mounted into Immich via an external library. The Image that fails can be found here: https://pam.bcn.jensen.ovh/sharing/tLiM6m1xY ### The OS that Immich Server is running on Docker ### Version of Immich Server V1.121.0 ### Version of Immich Mobile App V1.121.0 build.168 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /volume1/photo/:/mnt/photo:ro - /var/services/homes/florian/Photos:/mnt/photo-florian:ro - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:2283 depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: openvino # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell UPLOAD_LOCATION=./library IMMICH_VERSION=release DB_PASSWORD=######### DB_HOSTNAME=immich_postgres DB_USERNAME=####### DB_DATABASE_NAME=####### REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps Upload image to server. Refresh image thumbnails. Image thumbnail generation will continue to fail. ### Relevant log output ```shell immich_server | [Nest] 7 - 11/24/2024, 2:24:15 PM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: heif: Unsupported feature: Unsupported color conversion (4.3003) immich_server | [Nest] 7 - 11/24/2024, 2:24:15 PM ERROR [Microservices:JobService] Error: heif: Unsupported feature: Unsupported color conversion (4.3003) immich_server | at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17) immich_server | at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68) immich_server | at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:158:63) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) immich_server | at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:108:25) immich_server | at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:151:28) immich_server | at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:122:13) immich_server | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_server | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_server | [Nest] 7 - 11/24/2024, 2:24:15 PM ERROR [Microservices:JobService] Object: immich_server | { immich_server | "id": "85d4b07f-18cb-45e0-8a6e-f75b46a31de4" immich_server | } immich_server | ``` ``` ### Additional information _No response_
OVERLORD added the 🗄️serverformat labels 2026-02-05 10:53:17 +03:00
Author
Owner

@C4rbon14 commented on GitHub (Nov 30, 2024):

I'm having the same issue with all 200MP heic pictures from my samsung Galaxy S23.

@C4rbon14 commented on GitHub (Nov 30, 2024): I'm having the same issue with all 200MP heic pictures from my samsung Galaxy S23.
Author
Owner

@dbart37 commented on GitHub (Dec 8, 2024):

having also the same issue with s24 ultra and 200MP heic pictures

@dbart37 commented on GitHub (Dec 8, 2024): having also the same issue with s24 ultra and 200MP heic pictures
Author
Owner

@rrombu commented on GitHub (Dec 10, 2024):

Same behavior with several 200MP HEIC files from Galaxy S24 Ultra on latest version 1.122.2

@rrombu commented on GitHub (Dec 10, 2024): Same behavior with several 200MP HEIC files from Galaxy S24 Ultra on latest version 1.122.2
Author
Owner

@dbart37 commented on GitHub (Dec 20, 2024):

Still present in v1.123.0

@dbart37 commented on GitHub (Dec 20, 2024): Still present in v1.123.0
Author
Owner

@alextran1502 commented on GitHub (Dec 20, 2024):

The issue is still opened, which means we haven't gotten to it yet :)

@alextran1502 commented on GitHub (Dec 20, 2024): The issue is still opened, which means we haven't gotten to it yet :)
Author
Owner

@dbart37 commented on GitHub (Dec 21, 2024):

The issue is still opened, which means we haven't gotten to it yet :)

Sorry Alex for my impatience. I love your job here.
Happy New Year

@dbart37 commented on GitHub (Dec 21, 2024): > The issue is still opened, which means we haven't gotten to it yet :) Sorry Alex for my impatience. I love your job here. Happy New Year
Author
Owner

@Iaotle commented on GitHub (Feb 3, 2025):

It would really be nice if this was fixed, missing thumbnails make it hard to find what I'm looking for sometimes, and other than that Immich is such a great app now :)

@Iaotle commented on GitHub (Feb 3, 2025): It would really be nice if this was fixed, missing thumbnails make it hard to find what I'm looking for sometimes, and other than that Immich is such a great app now :)
Author
Owner

@Iaotle commented on GitHub (Mar 2, 2025):

I've made an issue on Sharp, and this issue should be solved when the next release of libvips (PR already merged) is out, and when Sharp updates the dependency. So hopefully everything works once those dependencies are updated here in Immich.

@Iaotle commented on GitHub (Mar 2, 2025): I've [made an issue on Sharp](https://github.com/lovell/sharp/issues/4335), and this issue should be solved when the next release of libvips ([PR already merged](https://github.com/libvips/libvips/pull/4398)) is out, and when Sharp updates the dependency. So hopefully everything works once those dependencies are updated here in Immich.
Author
Owner

@mertalev commented on GitHub (Mar 2, 2025):

Thanks for getting this fixed upstream! Now we just need to wait for the next libvips release to come out.

@mertalev commented on GitHub (Mar 2, 2025): Thanks for getting this fixed upstream! Now we just need to wait for the next libvips release to come out.
Author
Owner

@MoweME commented on GitHub (Mar 11, 2025):

RC has been published with a fix:
https://github.com/libvips/libvips/releases/tag/v8.17.0-test1

@MoweME commented on GitHub (Mar 11, 2025): RC has been published with a fix: https://github.com/libvips/libvips/releases/tag/v8.17.0-test1
Author
Owner

@Iaotle commented on GitHub (Mar 11, 2025):

@MoweME haha I'm also checking every couple days :D

@Iaotle commented on GitHub (Mar 11, 2025): @MoweME haha I'm also checking every couple days :D
Author
Owner

@C4rbon14 commented on GitHub (Apr 23, 2025):

I now get a different error when trying to generate thumbnails for those pictures:

2025-04-23T19:49:46.301382636Z [Nest] 7  - 04/23/2025, 1:49:46 PM   ERROR [Microservices:{"id":"278c1c27-1d8e-4079-916b-1fef99f6e3e9"}] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: heif: Memory allocation error: Security limit exceeded: Allocating 599270415 bytes exceeds the security limit of 536870912 bytes (6.1000)

2025-04-23T19:49:46.301456576Z Error: heif: Memory allocation error: Security limit exceeded: Allocating 599270415 bytes exceeds the security limit of 536870912 bytes (6.1000)

2025-04-23T19:49:46.301467231Z     at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)

2025-04-23T19:49:46.301469156Z     at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:97:68)

2025-04-23T19:49:46.301470881Z     at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:181:59)

2025-04-23T19:49:46.301472963Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

2025-04-23T19:49:46.301474600Z     at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:103:25)

2025-04-23T19:49:46.301476232Z     at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:166:28)

2025-04-23T19:49:46.301477765Z     at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:126:13)

2025-04-23T19:49:46.301479302Z     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)

2025-04-23T19:49:46.301480857Z     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
@C4rbon14 commented on GitHub (Apr 23, 2025): I now get a different error when trying to generate thumbnails for those pictures: ``` 2025-04-23T19:49:46.301382636Z [Nest] 7 - 04/23/2025, 1:49:46 PM ERROR [Microservices:{"id":"278c1c27-1d8e-4079-916b-1fef99f6e3e9"}] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: heif: Memory allocation error: Security limit exceeded: Allocating 599270415 bytes exceeds the security limit of 536870912 bytes (6.1000) 2025-04-23T19:49:46.301456576Z Error: heif: Memory allocation error: Security limit exceeded: Allocating 599270415 bytes exceeds the security limit of 536870912 bytes (6.1000) 2025-04-23T19:49:46.301467231Z at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17) 2025-04-23T19:49:46.301469156Z at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:97:68) 2025-04-23T19:49:46.301470881Z at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:181:59) 2025-04-23T19:49:46.301472963Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5) 2025-04-23T19:49:46.301474600Z at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:103:25) 2025-04-23T19:49:46.301476232Z at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:166:28) 2025-04-23T19:49:46.301477765Z at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:126:13) 2025-04-23T19:49:46.301479302Z at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) 2025-04-23T19:49:46.301480857Z at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) ```
Author
Owner

@Iaotle commented on GitHub (Apr 23, 2025):

Yes, the -unlimited flag needs to be set:

https://github.com/lovell/sharp/issues/4335#issuecomment-2671915115
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.

@alextran1502 it looks like all you need to do to solve this issue for all devices, since now the limits will be removed, and future high-resolution images should work no problem for thumbnail generation :)

@Iaotle commented on GitHub (Apr 23, 2025): Yes, the -unlimited flag needs to be set: >https://github.com/lovell/sharp/issues/4335#issuecomment-2671915115 > 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](https://github.com/libvips/libvips/pull/4398) to take advantage of this new feature. This change allows me to process the sample image provided locally without error. @alextran1502 it looks like all you need to do to solve this issue for all devices, since now the limits will be removed, and future high-resolution images should work no problem for thumbnail generation :)
Author
Owner

@saineela commented on GitHub (Jun 30, 2025):

I am having the same issue on the Latest Immich version 1.135.3 from Galaxy S24 Ultra 200MP images. Having thew same error and "Error Loading Image" because of this for all images in 200MP specifically from this phone only. Facing this Issue on Web and Mobile app. Also the Latest version of https://github.com/libvips/libvips/releases/tag/v8.17.0 has been released about a month ago

@saineela commented on GitHub (Jun 30, 2025): I am having the same issue on the Latest Immich version 1.135.3 from Galaxy S24 Ultra 200MP images. Having thew same error and "Error Loading Image" because of this for all images in 200MP specifically from this phone only. Facing this Issue on Web and Mobile app. Also the Latest version of https://github.com/libvips/libvips/releases/tag/v8.17.0 has been released about a month ago
Author
Owner

@mertalev commented on GitHub (Jul 2, 2025):

Also the Latest version of https://github.com/libvips/libvips/releases/tag/v8.17.0 has been released about a month ago

We use libvips through sharp, which has not made a release for 8.17 yet (only a release candidate).

@mertalev commented on GitHub (Jul 2, 2025): > Also the Latest version of https://github.com/libvips/libvips/releases/tag/v8.17.0 has been released about a month ago We use libvips through sharp, which has not made a release for 8.17 yet (only a release candidate).
Author
Owner

@Iaotle commented on GitHub (Jul 15, 2025):

@alextran1502

sharp v0.34.3 is now available with prebuilt binaries that include the upstream change to libvips. You'll need to set the unlimited flag to read these images, but please ensure you trust their source before doing so.

@Iaotle commented on GitHub (Jul 15, 2025): @alextran1502 > sharp v0.34.3 is now available with prebuilt binaries that include the upstream change to libvips. You'll need to set the `unlimited` flag to read these images, but please ensure you trust their source before doing so.
Author
Owner

@Saopanda commented on GitHub (Jul 17, 2025):

waiting new version

@Saopanda commented on GitHub (Jul 17, 2025): waiting new version
Author
Owner

@simonhammes commented on GitHub (Jul 27, 2025):

I've created #20327 which bumps sharp and adds the unlimited flag.

However, this depends on https://github.com/immich-app/base-images/pull/239.

@simonhammes commented on GitHub (Jul 27, 2025): I've created #20327 which bumps `sharp` and adds the `unlimited` flag. However, this depends on https://github.com/immich-app/base-images/pull/239.
Author
Owner

@Magicrafter13 commented on GitHub (Aug 17, 2025):

Same behavior with several 200MP HEIC files from Galaxy S24 Ultra on latest version 1.122.2

is that why this happens? I have the S23 ultra, and since the pictures from the 12 MP sensors work fine in Immich, I assumed it was simply too large of a resolution (16320 x 12240) - I wouldn't expect the images to be stored with different color settings or whatever

Edit: I've also noticed my 50 MP photos look fine, and those come from the 200 MP sensor, as far as I can tell, they're simply binned

@Magicrafter13 commented on GitHub (Aug 17, 2025): > Same behavior with several 200MP HEIC files from Galaxy S24 Ultra on latest version 1.122.2 is that why this happens? I have the S23 ultra, and since the pictures from the 12 MP sensors work fine in Immich, I assumed it was simply too large of a resolution (16320 x 12240) - I wouldn't expect the images to be stored with different color settings or whatever Edit: I've also noticed my 50 MP photos look fine, and those come from the 200 MP sensor, as far as I can tell, they're simply binned
Author
Owner

@jrasm91 commented on GitHub (Aug 30, 2025):

It looks like the upstream issue has been fixed and merged into the base-images repository. Is it this issue resolved now then?

@jrasm91 commented on GitHub (Aug 30, 2025): It looks like the upstream issue has been fixed and merged into the base-images repository. Is it this issue resolved now then?
Author
Owner

@saineela commented on GitHub (Aug 30, 2025):

I am not sure, Will update it to latest version and check @jrasm91.

@saineela commented on GitHub (Aug 30, 2025): I am not sure, Will update it to latest version and check @jrasm91.
Author
Owner

@mertalev commented on GitHub (Aug 30, 2025):

I believe it still needs #20327

@mertalev commented on GitHub (Aug 30, 2025): I believe it still needs #20327
Author
Owner

@mertalev commented on GitHub (Sep 4, 2025):

Fixed via #21596

@mertalev commented on GitHub (Sep 4, 2025): Fixed via #21596
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4802