Duplicated photoes post photo backup #4854

Closed
opened 2026-02-05 10:56:08 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @monghuz on GitHub (Dec 5, 2024).

The bug

Some of my recently uploaded photose from iPhone 14 Pro seems to be duplicated on the server.
The 2 visible differences are the resolution and the file size.

Despite both files have same dates and filename they are not flagged as duplicated ones.

The OS that Immich Server is running on

Unraid 6.12.10

Version of Immich Server

v1.120.2

Version of Immich Mobile App

v1.121.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

docker run
  -d
  --name='immich'
  --net='br0.10'
  --ip='192.168.xx.xx'
  -e TZ="Europe/Budapest"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="xxxxx"
  -e HOST_CONTAINERNAME="immich"
  -e 'TCP_PORT_8080'='8080'
  -e 'DB_HOSTNAME'='192.168.xx.yy'
  -e 'DB_USERNAME'='-----'
  -e 'DB_PASSWORD'='-----'
  -e 'DB_DATABASE_NAME'='immich'
  -e 'REDIS_HOSTNAME'='192.168.xx.zz'
  -e 'DB_PORT'='5432'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'=''
  -e 'MACHINE_LEARNING_HOST'='0.0.0.0'
  -e 'MACHINE_LEARNING_PORT'='3003'
  -e 'MACHINE_LEARNING_WORKERS'='1'
  -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8080]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
  -v '/photos/':'/photos':'rw'
  -v '/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich:openvino'

Your .env content

n/a

Reproduction steps

  1. setup backup on iphone to your server
  2. post upload wait immages get processed

Relevant log output

Full size image

{
  "id": 1132,
  "remoteId": "89c982d7-64c9-45d7-92b6-4c6584d9b2a1",
  "localId": "8EF9887C-B254-4D4D-8ACA-873C49BBE2C5/L0/001",
  "checksum": "90CEYpFkC84Sx31Go41qBUmzkuM=",
  "ownerId": 2126776699890217355,
  "livePhotoVideoId": "N/A",
  "stackId": "N/A",
  "stackPrimaryAssetId": "N/A",
  "stackCount": "0",
  "fileCreatedAt": "2024-11-10 12:01:47.808",
  "fileModifiedAt": "2024-11-10 18:03:06.000",
  "updatedAt": "2024-11-20 00:02:19.839",
  "durationInSeconds": 0,
  "type": "AssetType.image",
  "fileName": "IMG_7352.HEIC",
  "isFavorite": false,
  "isRemote": true,
  "storage": "AssetState.merged",
  "width": 10828,
  "height": 3858,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}


Reduced size
{
  "id": 1847,
  "remoteId": "1a26b6bd-72d4-4202-903e-2462817f7103",
  "localId": "C4311D7D-92CC-4BE2-9946-123F4BC7BD17/L0/001",
  "checksum": "5m4rqa2zT+12IpWMeuoBoD8uRfs=",
  "ownerId": 2126776699890217355,
  "livePhotoVideoId": "N/A",
  "stackId": "N/A",
  "stackPrimaryAssetId": "N/A",
  "stackCount": "0",
  "fileCreatedAt": "2024-11-10 12:01:47.808",
  "fileModifiedAt": "2024-11-10 12:01:56.000",
  "updatedAt": "2024-11-20 00:00:11.184",
  "durationInSeconds": 0,
  "type": "AssetType.image",
  "fileName": "IMG_7352.HEIC",
  "isFavorite": false,
  "isRemote": true,
  "storage": "AssetState.merged",
  "width": 4310,
  "height": 1536,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}

Additional information

No response

Originally created by @monghuz on GitHub (Dec 5, 2024). ### The bug Some of my recently uploaded photose from iPhone 14 Pro seems to be duplicated on the server. The 2 visible differences are the resolution and the file size. Despite both files have same dates and filename they are not flagged as duplicated ones. ### The OS that Immich Server is running on Unraid 6.12.10 ### Version of Immich Server v1.120.2 ### Version of Immich Mobile App v1.121.0 ### Platform with the issue - [X] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML docker run -d --name='immich' --net='br0.10' --ip='192.168.xx.xx' -e TZ="Europe/Budapest" -e HOST_OS="Unraid" -e HOST_HOSTNAME="xxxxx" -e HOST_CONTAINERNAME="immich" -e 'TCP_PORT_8080'='8080' -e 'DB_HOSTNAME'='192.168.xx.yy' -e 'DB_USERNAME'='-----' -e 'DB_PASSWORD'='-----' -e 'DB_DATABASE_NAME'='immich' -e 'REDIS_HOSTNAME'='192.168.xx.zz' -e 'DB_PORT'='5432' -e 'REDIS_PORT'='6379' -e 'REDIS_PASSWORD'='' -e 'MACHINE_LEARNING_HOST'='0.0.0.0' -e 'MACHINE_LEARNING_PORT'='3003' -e 'MACHINE_LEARNING_WORKERS'='1' -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png' -v '/photos/':'/photos':'rw' -v '/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich:openvino' ``` ### Your .env content ```Shell n/a ``` ### Reproduction steps 1. setup backup on iphone to your server 2. post upload wait immages get processed ### Relevant log output ```shell Full size image { "id": 1132, "remoteId": "89c982d7-64c9-45d7-92b6-4c6584d9b2a1", "localId": "8EF9887C-B254-4D4D-8ACA-873C49BBE2C5/L0/001", "checksum": "90CEYpFkC84Sx31Go41qBUmzkuM=", "ownerId": 2126776699890217355, "livePhotoVideoId": "N/A", "stackId": "N/A", "stackPrimaryAssetId": "N/A", "stackCount": "0", "fileCreatedAt": "2024-11-10 12:01:47.808", "fileModifiedAt": "2024-11-10 18:03:06.000", "updatedAt": "2024-11-20 00:02:19.839", "durationInSeconds": 0, "type": "AssetType.image", "fileName": "IMG_7352.HEIC", "isFavorite": false, "isRemote": true, "storage": "AssetState.merged", "width": 10828, "height": 3858, "isArchived": false, "isTrashed": false, "isOffline": false, } Reduced size { "id": 1847, "remoteId": "1a26b6bd-72d4-4202-903e-2462817f7103", "localId": "C4311D7D-92CC-4BE2-9946-123F4BC7BD17/L0/001", "checksum": "5m4rqa2zT+12IpWMeuoBoD8uRfs=", "ownerId": 2126776699890217355, "livePhotoVideoId": "N/A", "stackId": "N/A", "stackPrimaryAssetId": "N/A", "stackCount": "0", "fileCreatedAt": "2024-11-10 12:01:47.808", "fileModifiedAt": "2024-11-10 12:01:56.000", "updatedAt": "2024-11-20 00:00:11.184", "durationInSeconds": 0, "type": "AssetType.image", "fileName": "IMG_7352.HEIC", "isFavorite": false, "isRemote": true, "storage": "AssetState.merged", "width": 4310, "height": 1536, "isArchived": false, "isTrashed": false, "isOffline": false, } ``` ### Additional information _No response_
Author
Owner

@mmomjian commented on GitHub (Dec 5, 2024):

Immich will accept files that have a unique checksum, which a different resolution certainly would. We do not deduplicate by name or timestamp. You can use the duplicate finder tool builtin to Immich to help clean things up if you want. It would seem that you have multiple copies of each photo on your phone with different resolution.

@mmomjian commented on GitHub (Dec 5, 2024): Immich will accept files that have a unique checksum, which a different resolution certainly would. We do not deduplicate by name or timestamp. You can use the duplicate finder tool builtin to Immich to help clean things up if you want. It would seem that you have multiple copies of each photo on your phone with different resolution.
Author
Owner

@monghuz commented on GitHub (Dec 5, 2024):

hi @mmomjian ,

I'm afraid you missunderstand my issue.
On my phone I have only a single file with name IMG_7352.jpg file with 41MP (10828px x 3858px) resolution. (e.g. Both Apple's and Google's Photo shows this image once).
Post the backup if I check the either immich's Web UI or Mobile app, I do see the very same image twice. One with the same dimensions as the original on my phone and another one with a reduced resolution.

This is defenetly unintentional and it's happenning with about a hundred or so recent pictures and some of the older immages shoes the same issue back from 2022. out of the 10k I have uploaded so far.

@monghuz commented on GitHub (Dec 5, 2024): hi @mmomjian , I'm afraid you missunderstand my issue. On my phone I have only a single file with name IMG_7352.jpg file with 41MP (10828px x 3858px) resolution. (e.g. Both Apple's and Google's Photo shows this image once). Post the backup if I check the either immich's Web UI or Mobile app, I do see the very same image twice. One with the same dimensions as the original on my phone and another one with a reduced resolution. This is defenetly unintentional and it's happenning with about a hundred or so recent pictures and some of the older immages shoes the same issue back from 2022. out of the 10k I have uploaded so far.
Author
Owner

@mmomjian commented on GitHub (Dec 5, 2024):

Please share your docker compose and .env files.

@mmomjian commented on GitHub (Dec 5, 2024): Please share your docker compose and .env files.
Author
Owner

@alextran1502 commented on GitHub (Dec 5, 2024):

Would you be able to locate these two photos based on their creation/modified date and file name in the Apple Photos app?

@alextran1502 commented on GitHub (Dec 5, 2024): Would you be able to locate these two photos based on their creation/modified date and file name in the Apple Photos app?
Author
Owner

@monghuz commented on GitHub (Dec 5, 2024):

Would you be able to locate these two photos based on their creation/modified date and file name in the Apple Photos app?

In Apple Photo app there is a single photo. Only in Immich I have duplicate ones.

@monghuz commented on GitHub (Dec 5, 2024): > Would you be able to locate these two photos based on their creation/modified date and file name in the Apple Photos app? In Apple Photo app there is a single photo. Only in Immich I have duplicate ones.
Author
Owner

@monghuz commented on GitHub (Dec 5, 2024):

Please share your docker compose and .env files.

In Unraid we have a Community Applications folder which configures docker containers with a configuration file.
As such I don't use docker compose.
My docker run command should contain all parameters Immich is using.
Redis and Postgres containers are individual containers running along with Immich.

Do you have any hints how can I locate the .env file? Is it within the container's filesystem or the one docker-compose would us? If it's the latter I don't use any and all param should be detailed in docker run.

Regards
Tamás

@monghuz commented on GitHub (Dec 5, 2024): > Please share your docker compose and .env files. In Unraid we have a Community Applications folder which configures docker containers with a configuration file. As such I don't use docker compose. My docker run command should contain all parameters Immich is using. Redis and Postgres containers are individual containers running along with Immich. Do you have any hints how can I locate the .env file? Is it within the container's filesystem or the one docker-compose would us? If it's the latter I don't use any and all param should be detailed in docker run. Regards Tamás
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4854