Error: Input file contains unsupported image format #3224

Closed
opened 2026-02-05 08:04:54 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @Joly0 on GitHub (May 23, 2024).

The bug

I have an immich server with an external library of photos. When i run the facial recognition job, it shows an error for a picture and i am not sure which picture and why its showing the error.

The OS that Immich Server is running on

Unraid

Version of Immich Server

v1.105.1

Version of Immich Mobile App

None

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/user/nextcloud/joly0/files/Bilder:/joly0/ExterneBilder:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
      file: hwaccel.transcoding.yml
      service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/user/nextcloud/joly0/files/Bilder:/joly0/ExterneBilder:ro
    env_file:
      - .env
    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}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities:
                - gpu
    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:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    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}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always
    command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/user/immich
# The location where your database files are stored
DB_DATA_LOCATION=/mnt/cache/appdata/postgres-immich

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

I have no idea, it only happens for one image

Relevant log output

[Nest] 1088  - 05/23/2024, 1:18:46 PM   ERROR [ImmichMicroservices] [JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Input file contains unsupported image format
[Nest] 1088  - 05/23/2024, 1:18:46 PM   ERROR [ImmichMicroservices] [JobService] Error: Input file contains unsupported image format
    at Sharp.toFile (/app/immich/server/node_modules/sharp/lib/output.js:89:19)
    at MediaRepository.generateThumbnail (/app/immich/server/dist/repositories/media.repository.js:69:14)
    at PersonService.handleGeneratePersonThumbnail (/app/immich/server/dist/services/person.service.js:427:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/immich/server/dist/services/job.service.js:145:36
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 1088  - 05/23/2024, 1:18:46 PM   ERROR [ImmichMicroservices] [JobService] Object:
{
  "id": "468412be-b26d-402f-99fb-63cb2354f41f"
}

Additional information

No response

Originally created by @Joly0 on GitHub (May 23, 2024). ### The bug I have an immich server with an external library of photos. When i run the facial recognition job, it shows an error for a picture and i am not sure which picture and why its showing the error. ### The OS that Immich Server is running on Unraid ### Version of Immich Server v1.105.1 ### Version of Immich Mobile App None ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### 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} command: ['start.sh', 'immich'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/user/nextcloud/joly0/files/Bilder:/joly0/ExterneBilder:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding file: hwaccel.transcoding.yml service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding command: ['start.sh', 'microservices'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/user/nextcloud/joly0/files/Bilder:/joly0/ExterneBilder:ro env_file: - .env 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}-cuda deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu 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:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672 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} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data restart: always command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"] volumes: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/mnt/user/immich # The location where your database files are stored DB_DATA_LOCATION=/mnt/cache/appdata/postgres-immich # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps ```bash I have no idea, it only happens for one image ``` ### Relevant log output ```shell [Nest] 1088 - 05/23/2024, 1:18:46 PM ERROR [ImmichMicroservices] [JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Input file contains unsupported image format [Nest] 1088 - 05/23/2024, 1:18:46 PM ERROR [ImmichMicroservices] [JobService] Error: Input file contains unsupported image format at Sharp.toFile (/app/immich/server/node_modules/sharp/lib/output.js:89:19) at MediaRepository.generateThumbnail (/app/immich/server/dist/repositories/media.repository.js:69:14) at PersonService.handleGeneratePersonThumbnail (/app/immich/server/dist/services/person.service.js:427:36) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/immich/server/dist/services/job.service.js:145:36 at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 1088 - 05/23/2024, 1:18:46 PM ERROR [ImmichMicroservices] [JobService] Object: { "id": "468412be-b26d-402f-99fb-63cb2354f41f" } ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3224