HEIC video from an iPhone does not work #7066

Closed
opened 2026-02-05 12:45:04 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @OrangGeeGee on GitHub (Sep 1, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

HEIC videos from Apple iPhone 15 Pro Max, uploaded via Web UI do not generate thumbnails and doesn't load in Web UI (screenshot in the bottom).

Video file wouldn't attach here on GitHub, so here's a link to it:
https://asinica.lt/share/IMG_2129.zip
It's HEVC encoded video that does open with VLC video player just fine.

Image

The OS that Immich Server is running on

Ubuntu 24.04.2

Version of Immich Server

v1.140.1

Version of Immich Mobile App

v1.140.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Apple iPhone 15 Pro Max

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities:
                - gpu    
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
      # file: hwaccel.ml.yml
      # service: cuda # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:a137a2b60aca1a75130022d6bb96af423fefae4eb55faf395732db3544803280
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always

volumes:
  model-cache:

Your .env content

UPLOAD_LOCATION=/bigstore/immich/library
DB_DATA_LOCATION=/bigstore/immich/postgres
TZ=Europe/Vilnius
IMMICH_VERSION=release
DB_PASSWORD=<redacted>
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

  1. Upload the video file
  2. Try viewing it. Open in Web UI or mobile app

Relevant log output

[Nest] 7  - 09/01/2025, 9:37:37 PM   ERROR [Microservices:{"id":"83530dfc-9963-411c-a673-87676ced7d55"}] Unable to run job handler (AssetGenerateThumbnails): Error: Input file contains unsupported image format

Error: Input file contains unsupported image format

    at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17)

    at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68)

    at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59)

    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

    at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44)

    at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25)

    at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28)

    at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13)

    at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32

    at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24)

Additional information

No response

Originally created by @OrangGeeGee on GitHub (Sep 1, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug HEIC videos from Apple iPhone 15 Pro Max, uploaded via Web UI do not generate thumbnails and doesn't load in Web UI (screenshot in the bottom). Video file wouldn't attach here on GitHub, so here's a link to it: https://asinica.lt/share/IMG_2129.zip It's HEVC encoded video that does open with VLC video player just fine. <img width="1361" height="763" alt="Image" src="https://github.com/user-attachments/assets/0e5ac3c8-9eaa-47d6-b80b-7fa321d9d8bd" /> ### The OS that Immich Server is running on Ubuntu 24.04.2 ### Version of Immich Server v1.140.1 ### Version of Immich Mobile App v1.140.0 ### Platform with the issue - [x] Server - [x] Web - [x] Mobile ### Device make and model Apple iPhone 15 Pro Max ### Your docker-compose.yml content ```YAML name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cuda # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - stack.env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:a137a2b60aca1a75130022d6bb96af423fefae4eb55faf395732db3544803280 healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs # DB_STORAGE_TYPE: 'HDD' volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data shm_size: 128mb restart: always volumes: model-cache: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/bigstore/immich/library DB_DATA_LOCATION=/bigstore/immich/postgres TZ=Europe/Vilnius IMMICH_VERSION=release DB_PASSWORD=<redacted> DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Upload the video file 2. Try viewing it. Open in Web UI or mobile app ### Relevant log output ```shell [Nest] 7 - 09/01/2025, 9:37:37 PM ERROR [Microservices:{"id":"83530dfc-9963-411c-a673-87676ced7d55"}] Unable to run job handler (AssetGenerateThumbnails): Error: Input file contains unsupported image format Error: Input file contains unsupported image format at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68) at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44) at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25) at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28) at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13) at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32 at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24) ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Sep 2, 2025):

Are you running on RPi?

@alextran1502 commented on GitHub (Sep 2, 2025): Are you running on RPi?
Author
Owner

@OrangGeeGee commented on GitHub (Sep 2, 2025):

No. The server's running on AMD Ryzen 2600x with Nvidia RTX 3060 Ti

@OrangGeeGee commented on GitHub (Sep 2, 2025): No. The server's running on AMD Ryzen 2600x with Nvidia RTX 3060 Ti
Author
Owner

@dcrum commented on GitHub (Sep 2, 2025):

I have this problem too and I am running on an RPi. Same versions as above. This started for me with the v1.140 update. It's also not only HEIC format images...

Image
@dcrum commented on GitHub (Sep 2, 2025): I have this problem too and I am running on an RPi. Same versions as above. This started for me with the v1.140 update. It's also not only HEIC format images... <img width="1014" height="495" alt="Image" src="https://github.com/user-attachments/assets/686d35e9-8f5d-49d2-94f0-2ead35a2d4be" />
Author
Owner

@alextran1502 commented on GitHub (Sep 2, 2025):

@dcrum Please add VIPS_NOVECTOR=1 to the .env file and restart the stack. It will fix the issue

@alextran1502 commented on GitHub (Sep 2, 2025): @dcrum Please add VIPS_NOVECTOR=1 to the .env file and restart the stack. It will fix the issue
Author
Owner

@OrangGeeGee commented on GitHub (Sep 3, 2025):

So I've made some progress.
Hopped on postgres console with

sudo docker exec -it immich_postgres /bin/bash
psql -t -U postgres immich

Inspected the record for this asset to be IMAGE.

select * from asset where asset."originalPath" like '%IMG_2129%';

After doing

update asset set type = 'VIDEO' where id = '21539b72-b080-40fe-afb5-c58919654f21';

and rerunning generate thumbnails, I do see the thumbnail and the video does play in the preview as well as when viewing it in fullscreen.

So seems this was miscategorized as an image during upload, when in fact it is a video file. It was confusing to me at first too, as this does have the same .heic extension as an image would.

@OrangGeeGee commented on GitHub (Sep 3, 2025): So I've made some progress. Hopped on postgres console with ``` sudo docker exec -it immich_postgres /bin/bash psql -t -U postgres immich ``` Inspected the record for this asset to be IMAGE. ``` select * from asset where asset."originalPath" like '%IMG_2129%'; ``` After doing ``` update asset set type = 'VIDEO' where id = '21539b72-b080-40fe-afb5-c58919654f21'; ``` and rerunning generate thumbnails, I do see the thumbnail and the video does play in the preview as well as when viewing it in fullscreen. So seems this was miscategorized as an image during upload, when in fact it is a video file. It was confusing to me at first too, as this does have the same .heic extension as an image would.
Author
Owner

@alextran1502 commented on GitHub (Sep 3, 2025):

How does this file get the .heic extension? Which source did you get the file from, it should be .mov (You mentioned upload via web UI so I assume it is retrieved from other source that is not from the Immich's mobile app)

@alextran1502 commented on GitHub (Sep 3, 2025): How does this file get the `.heic` extension? Which source did you get the file from, it should be `.mov` (You mentioned upload via web UI so I assume it is retrieved from other source that is not from the Immich's mobile app)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7066