Metadata issue during download
Hi guys it is my first time to create a self-hosting service, I needed to clear a doubt of mine so I ask you. I put a series of albums on immich, however when I install them the photos no longer have metadata, how posos to do? is there a solution?
100 Replies
:wave: Hey @capufa,
Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker compose ps
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
Checklist
1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: I have read applicable release notes.
3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
4. :ballot_box_with_check: I have reviewed Github for known issues.
5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
7. :ballot_box_with_check: I have tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:What metadata are you looking for / what do you mean?
when I download a photo for example to immich, this photo no longer has date and time of shooting and location in the metadata
You’ll have to post some screenshots of exactly what you’re seeing / expecting
But it doesn't give me any error, simply the photos are without metadata
inserts the download metadata for me
I don’t understand what the issue is so I can’t really help without clear pictures.
Immich never edits the original file

nov/15

I downloaded it and now it says the photo was created on November 17
How did you upload the files into Immich?
Note that you're looking at the wrong metadata here
That's the time the file on your PC was created
drag and drop
Immich has no ability to edit the file creation Time. Only your operating system sets that
The date/time a photo was taken is stored in EXIF data inside the file
look here

are you sure immich does not edit metadata?
oh
You're on the right track but you're looking at the wrong EXIF fields
100% positive, to test you can take the checksum of the file before upload and again after download it will be identical
I noticed something: for photos that contain location data, I can download all metadata correctly. However, for photos that don’t have location data but only the date and time, the download assigns the date and time of the download itself instead of retaining the original ones.
Again, you’re not looking at the correct EXIF fields
Immich does not edit the file contents in any way
And where do I need to see the metadata?
Exiftool is best
oh thx
okay
some photos have correct date and time, with a more thorough set of metadata
TIL that exists 🤯

other photos do not have the correct metadata

How exactly did you download that file?

What metadata does immich show for that picture?
Exactly this ^

And this is all the metadata that file has?
yeah
only this
I don't understand the reason
Would you mind zipping that file up and sending that here?
Ty
I don't understand if I'm doing something wrong
This looks to be the thumbnail
but I press download
Are you actually sure you hit that download button and you're not mixing files up?
Is that a file you drag/dropped as well or did you upload it some other way?
I uploaded all my files in this way:
1) I created an album
2)I put the name and description
3)I dragged all the photos with drag and drop
100%
did I do something wrong?
As a sanity check, can you copy the id from the url and then go to
https://my-domain.com/api/assets/<id>/original
?what should i replace with id? sorry i am new to this world
i found it
on setting right?
What
No
You copy the id from the url (that last part of the path)
And then you replace <id> with that

Ok, now download that file
(as you would download any image on the internet, just right click and save)
Or
ctrl + s
I guessok thx
now analyze this picture
Yep :)

Same metadata :monkaHmm:
😭
Have you ever changed anything in the
uploads
folder?
Went spelunking there trying to fix someting?
Changed folder mounts?:monakS:
Is that a yes?
i don't think
lol
Oh
also because some photos have the right metadata, others do not
Please post the server logs
docker logs immich_server
this ?

Also, please show the EXIF info of this original file
It says the asset has no valid time or date in the logs
I don't understand where he gets this data from

Upload date?
yesterday
i upload all foto on immich
Oh I think I know what happened
When uploading via the web it actually takes the file metadata time from the client and passes that to the server
That's what is then used when displaying, but it's not in the file because it's not EXIF
yes, as @bo0tzz said these files have no EXIF data (location or time)
It should be writing that though, no?
I wish it was easier to tell exif tool to strip away the filesystem info
writing to what? that would be modifying the original file
Well yeah but uploading files through the web is already modifying the original file in a way
how so?
Idk it feels like a new file to me then 😅
this is the original file with metadata

if the checksum is identical the file is unchanged yes?
If we write to EXIF , the bytes on disk change
No, it's a separate field in the database and that never gets written to the sidecar
We probably should write it to the sidecar though
Fair
ie, make the fallback more explicit: If we don't read a date from the EXIF, we should explicitly write the date that was passed with the upload (if any) to the XMP as DateTimeOriginal
I think, at least
We shouldn't have an inconsistency between database and exif metadata, yeah
I'm very low on brain right now, if someone else wants to write that up in an issue it'd be appreciated 😅
what, Guys I don't understand anything anymore, because November 3rd doesn't appear on exit

if there is no November 3rd in the meta data, where does windwos get it from?
Doesn’t EXIF refer only to the data encoded in the file? Of course we will have discrepancy with that
I don’t view the XMP as “EXIF”
I certainly do
Hmm
Technically yes, but we tend to use "exif" to refer to the on-disk metadata generally
To me EXIF is the data encoded in the image itself
Wherever the file came from before set that
Or it was set when you moved the file onto your PC
But it's not in the file itself, it's in the filesystem metdata. Just like for example the filename
from what I understand then, files that have EXIF data are downloaded correctly with their specific metadata. While files that do not have EXIFs attached to them are downloaded with the date and time of the download
right?
All the files are downloaded complete as you uploaded them
However some of your files don't have the datetime metadata inside the file
And that part isn't (and can't be) downloaded
understood-I would have to analyze one photo after another to figure out which ones have metadata and which ones don't
For the record the issue #14191 wouldn’t actually change this behavior right?
[Issue] Metadata inconsistencies when uploading files through web without proper EXIF information (immich-app/immich#14191)
I don't think downloads currently include the sidecar, but they should, and together with that it would be much less confusing than things are now
Yeah we should probably include the sidecar files in the download, but I'd consider that a different issue/FR
For sure
Tyvm for creating that issue BTW
I suppose there is no workaround for that displayed date / missing EXIF download problem?