[BUG] Missing thumbnails for Olympus ORF files #1308

Closed
opened 2026-02-05 01:13:05 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @zhelyan on GitHub (Sep 6, 2023).

The bug

Olympus ORF files are not displayed in the gallery:

Screenshot 2023-09-06 at 09 16 08

The OS that Immich Server is running on

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)"

Version of Immich Server

v1.77.0

Version of Immich Mobile App

v1.77.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

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/nas/photos/immich
BACKUP_LOCATION=/mnt/nas/photos/immich/backups
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=xxxxxxxxx
DB_PASSWORD=xxxxxxxx

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

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Upload https://raw.pixls.us/getfile.php/1432/nice/Olympus%20-%20XZ-2%20-%2012bit%20(4:3).orf
2. Refresh the UI
3. Scroll down to find the file ( to 16 Jul 2016 )
4. The thumbnail is broken
...

Additional information

Error logs when refreshing the thumbnail:

immich_microservices     | [Nest] 8  - 09/06/2023, 8:14:41 AM    WARN [MediaRepository] Could not determine colorspace of image, defaulting to p3 profile
immich_microservices     | [Nest] 8  - 09/06/2023, 8:14:41 AM   ERROR [JobService] Unable to run job handler: Error: Input file contains unsupported image format
immich_microservices     | [Nest] 8  - 09/06/2023, 8:14:41 AM   ERROR [JobService] Error: Input file contains unsupported image format
immich_microservices     | [Nest] 8  - 09/06/2023, 8:14:41 AM   ERROR [JobService] Object:
immich_microservices     | {
immich_microservices     |   "id": "e677c493-d5a6-4795-a8f0-22884849a5a6"
immich_microservices     | }
immich_microservices     |
immich_microservices     |
Originally created by @zhelyan on GitHub (Sep 6, 2023). ### The bug Olympus ORF files are not displayed in the gallery: <img width="1401" alt="Screenshot 2023-09-06 at 09 16 08" src="https://github.com/immich-app/immich/assets/1583967/bac18e5c-37db-4510-a39d-6bc3745a8931"> ### The OS that Immich Server is running on PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" ### Version of Immich Server v1.77.0 ### Version of Immich Mobile App v1.77.0 ### Platform with the issue - [ ] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" 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 env_file: - .env depends_on: - redis - database - typesense restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - typesense restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### 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/nas/photos/immich BACKUP_LOCATION=/mnt/nas/photos/immich/backups # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=xxxxxxxxx DB_PASSWORD=xxxxxxxx # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Upload https://raw.pixls.us/getfile.php/1432/nice/Olympus%20-%20XZ-2%20-%2012bit%20(4:3).orf 2. Refresh the UI 3. Scroll down to find the file ( to 16 Jul 2016 ) 4. The thumbnail is broken ... ``` ### Additional information Error logs when refreshing the thumbnail: ``` immich_microservices | [Nest] 8 - 09/06/2023, 8:14:41 AM WARN [MediaRepository] Could not determine colorspace of image, defaulting to p3 profile immich_microservices | [Nest] 8 - 09/06/2023, 8:14:41 AM ERROR [JobService] Unable to run job handler: Error: Input file contains unsupported image format immich_microservices | [Nest] 8 - 09/06/2023, 8:14:41 AM ERROR [JobService] Error: Input file contains unsupported image format immich_microservices | [Nest] 8 - 09/06/2023, 8:14:41 AM ERROR [JobService] Object: immich_microservices | { immich_microservices | "id": "e677c493-d5a6-4795-a8f0-22884849a5a6" immich_microservices | } immich_microservices | immich_microservices | ```
OVERLORD added the format label 2026-02-05 01:13:05 +03:00
Author
Owner

@msrn commented on GitHub (Oct 15, 2023):

Also experiencing this issue. Tried it with the sample file above and got same results

[Nest] 995  - 10/15/2023, 1:14:24 PM   ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 995  - 10/15/2023, 1:14:24 PM   ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 995  - 10/15/2023, 1:14:24 PM   ERROR [JobService] Object:
{
  "id": "f24ed36d-00e1-4e52-b9c2-24cfe35d7ed2",
  "source": "upload"
}
@msrn commented on GitHub (Oct 15, 2023): Also experiencing this issue. Tried it with the sample file above and got same results ``` [Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format [Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Error: Input file contains unsupported image format [Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Object: { "id": "f24ed36d-00e1-4e52-b9c2-24cfe35d7ed2", "source": "upload" } ```
Author
Owner

@lyonzy commented on GitHub (Oct 20, 2023):

I went down the rabbit hole a bit on this. Immich uses Sharp for thumbnail rendering (alongside I'm sure much else) - command is here:

https://github.com/immich-app/immich/blob/main/server/src/infra/repositories/media.repository.ts#L28

Sharp uses libvips under the covers, and for raws like ORF libvips largely delegates to ImageMagick/GraphicsMagick.

Using the vips CLI (vips.exe copy .\P9170122.ORF .\P9170122.jpg) I got the same error trying to convert an ORF to a JPG (VipsForeignLoad: ".\P9170122.ORF" is not a known file format). Explicitly trying to use ImageMagick using vips magickload resulted in it not being able to find a ppm file which I assume is because ImageMagick isn't converting ORF->PPM.

So I have two mysteries - why libvips is saying it's not a known file format, and why ImageMagick isn't decoding ORFs. I'm hoping it might be as simple as putting a newer libmagick binary in.

There's also libraw in use, which is possibly how we're getting the metadata - it's possible that could also be used to make thumbnails (although it'd be simpler to have Sharp do it).

Another different idea might be to extract the embedded preview with something like this (might even save some compute power):
https://www.npmjs.com/package/raw-preview

@lyonzy commented on GitHub (Oct 20, 2023): I went down the rabbit hole a bit on this. Immich uses Sharp for thumbnail rendering (alongside I'm sure much else) - command is here: https://github.com/immich-app/immich/blob/main/server/src/infra/repositories/media.repository.ts#L28 Sharp uses `libvips` under the covers, and for raws like ORF `libvips` largely delegates to ImageMagick/GraphicsMagick. Using the `vips` CLI (`vips.exe copy .\P9170122.ORF .\P9170122.jpg`) I got the same error trying to convert an ORF to a JPG (`VipsForeignLoad: ".\P9170122.ORF" is not a known file format`). Explicitly trying to use ImageMagick using `vips magickload` resulted in it not being able to find a `ppm` file which I assume is because ImageMagick isn't converting ORF->PPM. So I have two mysteries - why `libvips` is saying it's not a known file format, and why ImageMagick isn't decoding ORFs. I'm hoping it might be as simple as putting a newer `libmagick` binary in. There's also `libraw` in use, which is possibly how we're getting the metadata - it's possible that could also be used to make thumbnails (although it'd be simpler to have Sharp do it). Another different idea might be to extract the embedded preview with something like this (might even save some compute power): https://www.npmjs.com/package/raw-preview
Author
Owner

@jrasm91 commented on GitHub (Oct 20, 2023):

this doesn't work - vips copy input.orf output.jpg
this does work - vips magickload input.orf output.jpg

For some reason it is not using this loader. I'm not sure which loader it is using, but it is not picking this one, which does work fine. So it is less about using a newer libmagick binary and more about vips just not picking a loader that works.

@jrasm91 commented on GitHub (Oct 20, 2023): this _doesn't_ work - `vips copy input.orf output.jpg` this _does_ work - `vips magickload input.orf output.jpg` For some reason it is not using this loader. I'm not sure which loader it is using, but it is not picking this one, which does work fine. So it is less about using a newer libmagick binary and more about vips just not picking a loader that works.
Author
Owner

@lyonzy commented on GitHub (Oct 21, 2023):

You did better than I did - maybe my copy of vips/libmagick was broken. Sounds like you're right, the only mystery is why it's not falling back to magick.

@lyonzy commented on GitHub (Oct 21, 2023): You did better than I did - maybe my copy of vips/libmagick was broken. Sounds like you're right, the only mystery is why it's not falling back to magick.
Author
Owner

@jrasm91 commented on GitHub (Oct 21, 2023):

I'm testing directly on the immich-microservices container

@jrasm91 commented on GitHub (Oct 21, 2023): I'm testing directly on the immich-microservices container
Author
Owner

@lyonzy commented on GitHub (Oct 21, 2023):

Yeah it eventually worked for me in an Alpine container (I was testing on a Debian machine and then in a Ubuntu container) - maybe I'm affected by the same bug they mentioned in their dockerfile.

@lyonzy commented on GitHub (Oct 21, 2023): Yeah it eventually worked for me in an Alpine container (I was testing on a Debian machine and then in a Ubuntu container) - maybe I'm affected by the same bug they mentioned [in their dockerfile](https://github.com/immich-app/immich/blob/250f7fc55c5d118369f06343b0d27c0521cbe7e8/server/Dockerfile#L13).
Author
Owner

@hiveai commented on GitHub (Nov 30, 2023):

Here is another file that has this issue: https://u.pcloud.link/publink/show?code=XZ969y0Z02um8sNzzwkbXzScdMpvghiXOaBy

@hiveai commented on GitHub (Nov 30, 2023): Here is another file that has this issue: https://u.pcloud.link/publink/show?code=XZ969y0Z02um8sNzzwkbXzScdMpvghiXOaBy
Author
Owner

@msrn commented on GitHub (Dec 1, 2023):

Apparently recent Dockerfile base-image change fixed RAW image thumbnail generation https://github.com/imagegenius/docker-immich/issues/208

But as tested with the latest image version, ORF files are still failing on thumbnail generation

@msrn commented on GitHub (Dec 1, 2023): Apparently recent Dockerfile base-image change fixed RAW image thumbnail generation https://github.com/imagegenius/docker-immich/issues/208 But as tested with the latest image version, `ORF` files are still failing on thumbnail generation
Author
Owner

@jrasm91 commented on GitHub (Dec 5, 2023):

Verified that this works with vips 8.15.

@jrasm91 commented on GitHub (Dec 5, 2023): Verified that this works with vips 8.15.
Author
Owner

@lyonzy commented on GitHub (Dec 14, 2023):

This is still broken for me on 1.90.2:

[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Object:
{
  "id": "8a519c99-716c-418a-b37a-5cadbb8123a4"
}
@lyonzy commented on GitHub (Dec 14, 2023): This is still broken for me on 1.90.2: ``` [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Error: Input file contains unsupported image format [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Object: { "id": "8a519c99-716c-418a-b37a-5cadbb8123a4" } ```
Author
Owner

@msrn commented on GitHub (Dec 14, 2023):

This is still broken for me on 1.90.2:

[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 8  - 12/14/2023, 12:31:01 AM   ERROR [JobService] Object:
{
  "id": "8a519c99-716c-418a-b37a-5cadbb8123a4"
}

The fix is not included in 1.90.2 it seems.

Main branch commit 02d55644e5 doesn't have tag associated with it. So I assume it's going to be available in the next release

@msrn commented on GitHub (Dec 14, 2023): > This is still broken for me on 1.90.2: > > ``` > [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format > [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Error: Input file contains unsupported image format > [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Object: > { > "id": "8a519c99-716c-418a-b37a-5cadbb8123a4" > } > ``` The fix is not included in `1.90.2` it seems. Main branch commit https://github.com/immich-app/immich/commit/02d55644e5001940fbf3480c3f891252baf24d3d doesn't have tag associated with it. So I assume it's going to be available in the next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1308