[BUG] Storage template does not apply to motion part of the live photos #2001

Closed
opened 2026-02-05 04:42:43 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @yuxincs on GitHub (Jan 17, 2024).

The bug

I have set up Immich and set the storage template to be <Album Name>/<Image Name>. However, it seems that the storage template somehow doesn't apply to the motion part of the live photos. Whenever the live photos (i.e., a heic file and a mov file) are uploaded to immich under an album, the static part (heic file) is properly stored under the album in the filesystem, but the motion part (the mov file) is put at the root instead.

The OS that Immich Server is running on

Official docker container

Version of Immich Server

v1.91.2

Version of Immich Mobile App

Irrelevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

  immich-server:
    container_name: immich-server
    image: ghcr.io/immich-app/immich-server:release
    command: [ "start.sh", "immich" ]
    user: 1000:1000
    volumes:
      - /mnt/system/config/immich:/usr/src/app/upload
      - /mnt/system/photos:/usr/src/app/upload/library
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /mnt/system/config/immich/env
    depends_on:
      - immich-redis
      - immich-database
    restart: unless-stopped

  immich-microservices:
    container_name: immich-microservices
    image: ghcr.io/immich-app/immich-server:release
    user: 1000:1000
    command: [ "start.sh", "microservices" ]
    volumes:
      - /mnt/system/config/immich:/usr/src/app/upload
      - /mnt/system/photos:/usr/src/app/upload/library
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /mnt/system/config/immich/env
    depends_on:
      - immich-redis
      - immich-database
    restart: unless-stopped

  immich-machine-learning:
    container_name: immich-machine-learning
    image: ghcr.io/immich-app/immich-machine-learning:release
    volumes:
      - /mnt/system/config/immich/cache:/cache
    env_file:
      - /mnt/system/config/immich/env
    restart: unless-stopped

  immich-redis:
    container_name: immich-redis
    image: redis:6.2-alpine
    networks:
      - homeserver
    restart: unless-stopped

  immich-database:
    container_name: immich-database
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    user: 1000:1000
    env_file:
      - /mnt/system/config/immich/env
    volumes:
      - /mnt/system/config/immich/postgres:/var/lib/postgresql/data
    restart: unless-stopped

Your .env content

# For database (postgres) connections.
DB_HOSTNAME=immich-database
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
DB_PASSWORD=<REDACTED>
# Postgres container needs their own naming of env vars.
POSTGRES_PASSWORD=${DB_PASSWORD}
POSTGRES_USER=${DB_USERNAME}
POSTGRES_DB=${DB_DATABASE_NAME}

# For redis connections.
REDIS_HOSTNAME=immich-redis

# For machine learning container.
MPLCONFIGDIR=/cache/matplotlib

Reproduction steps

1. Set `<Album Name>/<Image Name>` storage template in the settings.
2. Upload a live photo (a heic and a mov file) under Album `A`.
3. Check the filesystem. The heic file is stored in `A/`, but the mov file is stored at `./`.

Additional information

No response

Originally created by @yuxincs on GitHub (Jan 17, 2024). ### The bug I have set up Immich and set the storage template to be `<Album Name>/<Image Name>`. However, it seems that the storage template somehow doesn't apply to the motion part of the live photos. Whenever the live photos (i.e., a heic file and a mov file) are uploaded to immich under an album, the static part (heic file) is properly stored under the album in the filesystem, but the motion part (the mov file) is put at the root instead. ### The OS that Immich Server is running on Official docker container ### Version of Immich Server v1.91.2 ### Version of Immich Mobile App Irrelevant ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML immich-server: container_name: immich-server image: ghcr.io/immich-app/immich-server:release command: [ "start.sh", "immich" ] user: 1000:1000 volumes: - /mnt/system/config/immich:/usr/src/app/upload - /mnt/system/photos:/usr/src/app/upload/library - /etc/localtime:/etc/localtime:ro env_file: - /mnt/system/config/immich/env depends_on: - immich-redis - immich-database restart: unless-stopped immich-microservices: container_name: immich-microservices image: ghcr.io/immich-app/immich-server:release user: 1000:1000 command: [ "start.sh", "microservices" ] volumes: - /mnt/system/config/immich:/usr/src/app/upload - /mnt/system/photos:/usr/src/app/upload/library - /etc/localtime:/etc/localtime:ro env_file: - /mnt/system/config/immich/env depends_on: - immich-redis - immich-database restart: unless-stopped immich-machine-learning: container_name: immich-machine-learning image: ghcr.io/immich-app/immich-machine-learning:release volumes: - /mnt/system/config/immich/cache:/cache env_file: - /mnt/system/config/immich/env restart: unless-stopped immich-redis: container_name: immich-redis image: redis:6.2-alpine networks: - homeserver restart: unless-stopped immich-database: container_name: immich-database image: tensorchord/pgvecto-rs:pg14-v0.1.11 user: 1000:1000 env_file: - /mnt/system/config/immich/env volumes: - /mnt/system/config/immich/postgres:/var/lib/postgresql/data restart: unless-stopped ``` ### Your .env content ```Shell # For database (postgres) connections. DB_HOSTNAME=immich-database DB_USERNAME=postgres DB_DATABASE_NAME=immich DB_PASSWORD=<REDACTED> # Postgres container needs their own naming of env vars. POSTGRES_PASSWORD=${DB_PASSWORD} POSTGRES_USER=${DB_USERNAME} POSTGRES_DB=${DB_DATABASE_NAME} # For redis connections. REDIS_HOSTNAME=immich-redis # For machine learning container. MPLCONFIGDIR=/cache/matplotlib ``` ### Reproduction steps ```bash 1. Set `<Album Name>/<Image Name>` storage template in the settings. 2. Upload a live photo (a heic and a mov file) under Album `A`. 3. Check the filesystem. The heic file is stored in `A/`, but the mov file is stored at `./`. ``` ### Additional information _No response_
Author
Owner

@yuxincs commented on GitHub (Jan 28, 2024):

Not really sure when it got fixed, but I'm closing this issue since it seems to be gone in v1.19.3. Great work!

@yuxincs commented on GitHub (Jan 28, 2024): Not really sure when it got fixed, but I'm closing this issue since it seems to be gone in v1.19.3. Great work!
Author
Owner

@opichals commented on GitHub (Aug 23, 2025):

I am still seeing this with server v1.137.3.

From what I could figure I think this might be because the livePhotoVideoId of the life photo is not put into any album.

Here is how it looks like the database:

immich=# select id, "originalFileName", "livePhotoVideoId" from asset where "originalFileName" like 'IMG_0862%';
                  id                  | originalFileName |           livePhotoVideoId           
--------------------------------------+------------------+--------------------------------------
 356ac4e4-00cc-4f97-9a3a-45e3e81ac6b7 | IMG_0862.HEIC    | 728dbe31-19b8-406f-ad93-47bc7c84a9a4
 728dbe31-19b8-406f-ad93-47bc7c84a9a4 | IMG_0862.MOV     | 
(2 rows)

immich=# select "assetsId" from album_asset where "assetsId" in (select id from asset where "originalFileName" like 'IMG_0862%');
               assetsId               
--------------------------------------
 356ac4e4-00cc-4f97-9a3a-45e3e81ac6b7
(1 row)
@opichals commented on GitHub (Aug 23, 2025): I am still seeing this with server `v1.137.3`. From what I could figure I think this might be because the livePhotoVideoId of the life photo is not put into any album. Here is how it looks like the database: ``` immich=# select id, "originalFileName", "livePhotoVideoId" from asset where "originalFileName" like 'IMG_0862%'; id | originalFileName | livePhotoVideoId --------------------------------------+------------------+-------------------------------------- 356ac4e4-00cc-4f97-9a3a-45e3e81ac6b7 | IMG_0862.HEIC | 728dbe31-19b8-406f-ad93-47bc7c84a9a4 728dbe31-19b8-406f-ad93-47bc7c84a9a4 | IMG_0862.MOV | (2 rows) immich=# select "assetsId" from album_asset where "assetsId" in (select id from asset where "originalFileName" like 'IMG_0862%'); assetsId -------------------------------------- 356ac4e4-00cc-4f97-9a3a-45e3e81ac6b7 (1 row) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2001