immich-go icon indicating copy to clipboard operation
immich-go copied to clipboard

"upload from-google-photos": missing photos in albums

Open lueckem opened this issue 4 months ago • 3 comments

Immich-go: v0.27.0 Immich: v1.135.3 Google Takeout from 18.07.2025

I used this command on a fresh immich instance:

immich-go \
  upload from-google-photos \
  --server=<myserver> \
  --api-key=<myapikey> \
  --admin-api-key=<myadminapikey> \
  --manage-burst=NoStack \
  --manage-heic-jpeg=NoStack \
  --manage-raw-jpeg=NoStack \
  --people-tag=FALSE \
  takeout-*.zip

It succeeded with this message from the logs:

2025-07-19 15:52:05 INF Input analysis:
2025-07-19 15:52:05 INF ---------------
2025-07-19 15:52:05 INF scanned image file                      :   13184
2025-07-19 15:52:05 INF scanned video file                      :     626
2025-07-19 15:52:05 INF scanned sidecar file                    :   16513
2025-07-19 15:52:05 INF discarded file                          :       0
2025-07-19 15:52:05 INF unsupported file                        :       0
2025-07-19 15:52:05 INF file duplicated in the input            :    2997
2025-07-19 15:52:05 INF associated metadata file                :   13810
2025-07-19 15:52:05 INF missing associated metadata file        :       0
2025-07-19 15:52:05 INF 
2025-07-19 15:52:05 INF Uploading:
2025-07-19 15:52:05 INF ----------
2025-07-19 15:52:05 INF uploaded                                :    9761
2025-07-19 15:52:05 INF upload error                            :       0
2025-07-19 15:52:05 INF file not selected                       :       0
2025-07-19 15:52:05 INF server's asset upgraded with the input  :     730
2025-07-19 15:52:05 INF server has same asset                   :       0
2025-07-19 15:52:05 INF server has a better asset               :     322

All albums that I had in Google were created in immich. However, some photos were successfully uploaded to immich but not added to the correct album. For example, the album "My Album" (changed name because of privacy) has 620 photos in Google but only 493 in immich.

I discovered that the photos that are missing have the .jpg file in the "Photos from XXXX" directory in the google takeout instead of the "My Album" directory. For example, the photo "IMG_2106" is missing in the immich album.

❯ fd "IMG_2106"                             
My Album/IMG_2106.JPG.supplemental-metadata.json
Photos from 2022/IMG_2106.JPG
Photos from 2022/IMG_2106.JPG.supplemental-metadata.json

The photo "IMG_2104" on the other hand was correctly put in the album in immich.

❯ fd "IMG_2104"
My Album/IMG_2104.JPG
My Album/IMG_2104.JPG.supplemental-metadata.json
Photos from 2022/IMG_2104.JPG.supplemental-metadata.json

Is this a bug or am I doing something wrong? I looked at the immich-go logs and the immich logs (docker compose logs) but did not find any associated errors or warnings.

Edit: Probably related to #932 and #482

lueckem avatar Jul 19 '25 21:07 lueckem

I think I had a similar situation when I moved a few months ago. One album had 1598 pictures, the Immich version has 12. The 12 in the album aren't pictures I took - they're all pictures I downloaded from texts. I'm wondering if the photos I took were in a different folder in the takeout, like you.

wiggleforlife avatar Aug 14 '25 17:08 wiggleforlife

That was indeed the problem. For many of my photos that should have been in multiple locations in the Takout, for example in multiple albums, Google Takeout had only downloaded the media file once, put it in one of these locations, and then put only the metadata file in the other locations. The upload to immich can be fixed by copying the missing media files to these locations.

Ultimately, I wrote a Python script that does this automatically. (Find the "orphan" metadata files and then search and copy over the correct media file.) The script is tailored specifically to my files though, it will likely not work for others.

Not sure if it would make sense to include such a hack in immich-go. This should rather be fixed by Google Takeout actually putting the media files in the correct places...

lueckem avatar Aug 14 '25 18:08 lueckem

Having the same problem some albums with over 750 photos on Google only have 56 on immich,

Also noticed the tags are created and populated during the import, but something happens in the template migration after the import ends, that make the photos to miss the tags.

gusdleon avatar Aug 17 '25 10:08 gusdleon