Unsupported file format or not RAW file #4632

Closed
opened 2026-02-05 10:45:14 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @devtechk on GitHub (Oct 25, 2024).

The bug

Hello I own iphone 16 pro max trying to save my photo in immich but I've problems loading .dng thumbnail images...
In some case (very rare) it loads the thumbnail but most of the time no, I think it's releated to the 1.118.2 Immich version.
Mobile works perfect, in desktop browser no.

The OS that Immich Server is running on

debian 12

Version of Immich Server

1.118.2

Version of Immich Mobile App

1.118.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich
services:
  database:
    cpu_shares: 90
    command:
      - postgres
      - -c
      - shared_preload_libraries=vectors.so
      - -c
      - search_path="", public, vectors
      - -c
      - logging_collector=on
      - -c
      - max_wal_size=2GB
      - -c
      - shared_buffers=512MB
      - -c
      - wal_compression=on
    container_name: immich_postgres
    deploy:
      resources:
        limits:
          memory: 15883M
    environment:
      - POSTGRES_DB=immich
      - POSTGRES_INITDB_ARGS=--data-checksums
      - POSTGRES_PASSWORD=casaos
      - POSTGRES_USER=casaos
    hostname: immich_postgres
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready --dbname='' || exit 1; Chksum="$(psql --dbname=''
          --username='' --tuples-only --no-align --command='SELECT
          COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo
          "checksum failure count is "; [ "" = '0' ] || exit 1
      interval: 5m0s
      start_period: 5m0s
      start_interval: 30s
    image: tensorchord/pgvecto-rs:pg14-v0.2.0
    labels:
      icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/immich-custom/pgdata
        target: /var/lib/postgresql/data
        bind:
          create_host_path: true
    ports: []
    devices: []
    cap_add: []
    networks:
      - immich
    privileged: false
  immich-machine-learning:
    cpu_shares: 90
    command: []
    container_name: immich_machine_learning
    deploy:
      resources:
        limits:
          memory: 15883M
    environment:
      - DB_DATABASE_NAME=immich
      - DB_PASSWORD=casaos
      - DB_USERNAME=casaos
    hostname: immich_machine_learning
    image: altran1502/immich-machine-learning:release
    labels:
      icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/immich-custom/model-cache
        target: /cache
        bind:
          create_host_path: true
    ports: []
    devices: []
    cap_add: []
    networks:
      - immich
    privileged: false
  immich-server:
    cpu_shares: 90
    command: []
    container_name: immich_server
    depends_on:
      database:
        condition: service_started
        required: true
      redis:
        condition: service_started
        required: true
    deploy:
      resources:
        limits:
          memory: 15883M
        reservations:
          memory: "1073741824"
    environment:
      - DB_DATABASE_NAME=immich
      - DB_PASSWORD=casaos
      - DB_USERNAME=casaos
    hostname: immich_server
    image: altran1502/immich-server:release
    labels:
      icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png
    ports:
      - mode: ingress
        target: 2283
        published: "2283"
        protocol: tcp
      - target: 3001
        published: "2115"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /mnt/seagate/Media/Foto/upload
        target: /usr/src/app/upload
        bind:
          create_host_path: true
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
      - type: bind
        source: /mnt/seagate/Media/macchina-fotografica-famiglia
        target: /usr/src/app/external
    devices: []
    cap_add: []
    networks:
      - immich
    privileged: false
  redis:
    cpu_shares: 90
    command: []
    container_name: immich_redis
    deploy:
      resources:
        limits:
          memory: 15883M
    hostname: immich_redis
    healthcheck:
      test:
        - CMD-SHELL
        - redis-cli ping || exit 1
    image: redis:6.2-alpine
    labels:
      icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png
    restart: unless-stopped
    ports: []
    volumes: []
    devices: []
    cap_add: []
    environment: []
    networks:
      - immich
    privileged: false
networks:
  immich:
    name: immich
x-casaos:
  architectures:
    - amd64
    - arm64
  author: Cp0204
  category: Gallery
  description:
    en_us: "Alex is a software engineer who, along with his wife, faced a common
      problem after the birth of their newborn: they didn't want to pay for a
      backup application anymore. So, he decided to develop an alternative
      focused on backing up photos and videos. This application prioritizes
      privacy protection and offers user-friendly access to photos and videos.
      Alex aims to give back to the open-source community through this project."
    zh_cn: Alex
      是一位软件工程师,他与妻子在新生儿出生后面对一个共同问题:不想再为付费备份应用买单了。于是,他决定开发一个替代品,专注于照片和视频备份。这款应用注重隐私保护,方便用户查看照片和视频,操作简单易用。Alex
      希望通过这个项目回馈开源社区。
  developer: alextran1502
  hostname: ""
  icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png
  index: /
  is_uncontrolled: true
  main: immich-server
  port_map: "2283"
  scheme: http
  screenshot_link:
    - https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/screenshot-1.png
  store_app_id: immich
  tagline:
    en_us: High performance self-hosted photo and video backup solution
    zh_cn: 高性能的自托管照片和视频备份方案
  thumbnail: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/thumbnail.png
  tips:
    before_install:
      en_us: |
        ⚠️ The project is under very active development.
        ⚠️ Expect bugs and breaking changes.
        ⚠️ Do not use the app as the only way to store your photos and videos.
        ⚠️ Always follow 3-2-1 backup plan for your precious photos and videos!
      zh_cn: |
        ⚠️ 本项目正在 非常活跃 地开发中。
        ⚠️ 可能存在 bug 或者随时有重大变更。
        ⚠️ 不要把本软件作为您存储照片或视频的唯一方式。
        ⚠️ 为了您宝贵的照片与视频,请始终遵守 3-2-1 备份方案!
  title:
    custom: Immich
    en_us: immich

Your .env content

no

Reproduction steps

  1. Upload foto in pro raw format
  2. Run thumbnail job
  3. See the result
    ...

Relevant log output

[Nest] 7  - 10/24/2024, 9:14:32 PM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file has corrupt header: magickload: Magic file `upload/library/admin/2024/2024-10-24/IMG_9025.DNG' @ error/dng.c/ReadDNGImage/504 (null)
[Nest] 7  - 10/24/2024, 9:14:32 PM   ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: Unsupported file format or not RAW file `upload/library/admin/2024.c/ReadDNGImage/504 (null)
    at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17)
    at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68)
    at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:153:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:101:25)
    at async /usr/src/app/dist/services/job.service.js:163:36
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 10/24/2024, 9:14:32 PM   ERROR [Microservices:JobService] Object:
{
  "id": "45f84fc1-93e0-4d95-9e7f-8c938c2766a4",
  "source": "upload"
}

Additional information

All day logs 24 october 2024
logsAll.txt

Originally created by @devtechk on GitHub (Oct 25, 2024). ### The bug Hello I own iphone 16 pro max trying to save my photo in immich but I've problems loading .dng thumbnail images... In some case (very rare) it loads the thumbnail but most of the time no, I think it's releated to the 1.118.2 Immich version. Mobile works perfect, in desktop browser no. ### The OS that Immich Server is running on debian 12 ### Version of Immich Server 1.118.2 ### Version of Immich Mobile App 1.118.2 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML name: immich services: database: cpu_shares: 90 command: - postgres - -c - shared_preload_libraries=vectors.so - -c - search_path="", public, vectors - -c - logging_collector=on - -c - max_wal_size=2GB - -c - shared_buffers=512MB - -c - wal_compression=on container_name: immich_postgres deploy: resources: limits: memory: 15883M environment: - POSTGRES_DB=immich - POSTGRES_INITDB_ARGS=--data-checksums - POSTGRES_PASSWORD=casaos - POSTGRES_USER=casaos hostname: immich_postgres healthcheck: test: - CMD-SHELL - pg_isready --dbname='' || exit 1; Chksum="$(psql --dbname='' --username='' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is "; [ "" = '0' ] || exit 1 interval: 5m0s start_period: 5m0s start_interval: 30s image: tensorchord/pgvecto-rs:pg14-v0.2.0 labels: icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png restart: unless-stopped volumes: - type: bind source: /DATA/AppData/immich-custom/pgdata target: /var/lib/postgresql/data bind: create_host_path: true ports: [] devices: [] cap_add: [] networks: - immich privileged: false immich-machine-learning: cpu_shares: 90 command: [] container_name: immich_machine_learning deploy: resources: limits: memory: 15883M environment: - DB_DATABASE_NAME=immich - DB_PASSWORD=casaos - DB_USERNAME=casaos hostname: immich_machine_learning image: altran1502/immich-machine-learning:release labels: icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png restart: unless-stopped volumes: - type: bind source: /DATA/AppData/immich-custom/model-cache target: /cache bind: create_host_path: true ports: [] devices: [] cap_add: [] networks: - immich privileged: false immich-server: cpu_shares: 90 command: [] container_name: immich_server depends_on: database: condition: service_started required: true redis: condition: service_started required: true deploy: resources: limits: memory: 15883M reservations: memory: "1073741824" environment: - DB_DATABASE_NAME=immich - DB_PASSWORD=casaos - DB_USERNAME=casaos hostname: immich_server image: altran1502/immich-server:release labels: icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png ports: - mode: ingress target: 2283 published: "2283" protocol: tcp - target: 3001 published: "2115" protocol: tcp restart: unless-stopped volumes: - type: bind source: /mnt/seagate/Media/Foto/upload target: /usr/src/app/upload bind: create_host_path: true - type: bind source: /etc/localtime target: /etc/localtime read_only: true bind: create_host_path: true - type: bind source: /mnt/seagate/Media/macchina-fotografica-famiglia target: /usr/src/app/external devices: [] cap_add: [] networks: - immich privileged: false redis: cpu_shares: 90 command: [] container_name: immich_redis deploy: resources: limits: memory: 15883M hostname: immich_redis healthcheck: test: - CMD-SHELL - redis-cli ping || exit 1 image: redis:6.2-alpine labels: icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png restart: unless-stopped ports: [] volumes: [] devices: [] cap_add: [] environment: [] networks: - immich privileged: false networks: immich: name: immich x-casaos: architectures: - amd64 - arm64 author: Cp0204 category: Gallery description: en_us: "Alex is a software engineer who, along with his wife, faced a common problem after the birth of their newborn: they didn't want to pay for a backup application anymore. So, he decided to develop an alternative focused on backing up photos and videos. This application prioritizes privacy protection and offers user-friendly access to photos and videos. Alex aims to give back to the open-source community through this project." zh_cn: Alex 是一位软件工程师,他与妻子在新生儿出生后面对一个共同问题:不想再为付费备份应用买单了。于是,他决定开发一个替代品,专注于照片和视频备份。这款应用注重隐私保护,方便用户查看照片和视频,操作简单易用。Alex 希望通过这个项目回馈开源社区。 developer: alextran1502 hostname: "" icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/icon.png index: / is_uncontrolled: true main: immich-server port_map: "2283" scheme: http screenshot_link: - https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/screenshot-1.png store_app_id: immich tagline: en_us: High performance self-hosted photo and video backup solution zh_cn: 高性能的自托管照片和视频备份方案 thumbnail: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/immich/thumbnail.png tips: before_install: en_us: | ⚠️ The project is under very active development. ⚠️ Expect bugs and breaking changes. ⚠️ Do not use the app as the only way to store your photos and videos. ⚠️ Always follow 3-2-1 backup plan for your precious photos and videos! zh_cn: | ⚠️ 本项目正在 非常活跃 地开发中。 ⚠️ 可能存在 bug 或者随时有重大变更。 ⚠️ 不要把本软件作为您存储照片或视频的唯一方式。 ⚠️ 为了您宝贵的照片与视频,请始终遵守 3-2-1 备份方案! title: custom: Immich en_us: immich ``` ### Your .env content ```Shell no ``` ### Reproduction steps 1. Upload foto in pro raw format 2. Run thumbnail job 3. See the result ... ### Relevant log output ```shell [Nest] 7 - 10/24/2024, 9:14:32 PM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Input file has corrupt header: magickload: Magic file `upload/library/admin/2024/2024-10-24/IMG_9025.DNG' @ error/dng.c/ReadDNGImage/504 (null) [Nest] 7 - 10/24/2024, 9:14:32 PM ERROR [Microservices:JobService] Error: Input file has corrupt header: magickload: Magick: Unsupported file format or not RAW file `upload/library/admin/2024.c/ReadDNGImage/504 (null) at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/dist/repositories/media.repository.js:57:68) at MediaService.generateImageThumbnails (/usr/src/app/dist/services/media.service.js:153:63) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async MediaService.handleGenerateThumbnails (/usr/src/app/dist/services/media.service.js:101:25) at async /usr/src/app/dist/services/job.service.js:163:36 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 7 - 10/24/2024, 9:14:32 PM ERROR [Microservices:JobService] Object: { "id": "45f84fc1-93e0-4d95-9e7f-8c938c2766a4", "source": "upload" } ``` ### Additional information All day logs 24 october 2024 [logsAll.txt](https://github.com/user-attachments/files/17517859/logsAll.txt)
Author
Owner

@mertalev commented on GitHub (Oct 25, 2024):

This is being tracked in #13029.

@mertalev commented on GitHub (Oct 25, 2024): This is being tracked in #13029.
Author
Owner

@timbatog commented on GitHub (Jun 5, 2025):

Is there any value in providing sample DNG files from my OM-1 Mark II Version 1.2 - both as native RAW and converted in Lightroom DNGs (lossy and lossless)?

I'd love to be able to see my DNGs in Immich but as of today - June 2025 - these just appear as broken thumbnails and break by processing workflow.

@timbatog commented on GitHub (Jun 5, 2025): Is there any value in providing sample DNG files from my OM-1 Mark II Version 1.2 - both as native RAW and converted in Lightroom DNGs (lossy and lossless)? I'd love to be able to see my DNGs in Immich but as of today - June 2025 - these just appear as broken thumbnails and break by processing workflow.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4632