Immich sorts by the wrong date metadata - Should use Date Taken exif before anything else

Immich is taking the modified or created date and using that for the sorting, instead of using the actual Date Taken metadata. This means that photos exported today which were taken a year ago come up as from today, for example. How can I fix this? Surely there's a setting for it that I've just missed? As-is makes everything date-related – including the main timeline – wrong.
52 Replies
Immich
Immich3w ago
:wave: Hey @EmSixTeen, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. 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 ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: 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) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
EmSixTeen
EmSixTeenOP3w ago
No description
bo0tzz
bo0tzz3w ago
What are the actual EXIF fields in the file, as read by exiftool?
EmSixTeen
EmSixTeenOP3w ago
No description
bo0tzz
bo0tzz3w ago
That's not exiftool
EmSixTeen
EmSixTeenOP3w ago
..
bo0tzz
bo0tzz3w ago
I'm not just being annoying for the sake of it. exiftool outputs the exif fields exactly as they are in the file, and is also what Immich uses on the backend, so it's the only good way to know what's actually going on for troubleshooting purposes.
EmSixTeen
EmSixTeenOP3w ago
Right, you know it's correct though. Anyway here's direct from exiftool:
[File:System] FileModifyDate : 2025:04:14 10:34:06+02:00
[File:System] FileAccessDate : 2025:04:14 10:34:06+02:00
[File:System] FileCreateDate : 2025:04:14 10:34:06+02:00
[EXIF:IFD0] ModifyDate : 2025:04:14 10:34:07
[EXIF:ExifIFD] DateTimeOriginal : 2024:09:07 14:52:13
[EXIF:ExifIFD] CreateDate : 2024:09:07 14:52:13
[EXIF:ExifIFD] OffsetTime : +02:00
[EXIF:ExifIFD] OffsetTimeOriginal : +01:00
[EXIF:ExifIFD] OffsetTimeDigitized : +01:00
[EXIF:ExifIFD] SubSecTimeOriginal : 23
[EXIF:ExifIFD] SubSecTimeDigitized : 23
[IPTC] DateCreated : 2024:09:07
[IPTC] TimeCreated : 14:52:13+01:00
[IPTC] DigitalCreationDate : 2024:09:07
[IPTC] DigitalCreationTime : 14:52:13+01:00
[ICC_Profile:ICC-header] ProfileDateTime : 1998:02:09 06:49:00
[XMP:XMP-xmp] ModifyDate : 2025:04:14 10:34:07+02:00
[XMP:XMP-xmp] CreateDate : 2024:09:07 14:52:13.23+01:00
[XMP:XMP-xmp] MetadataDate : 2025:04:14 10:34:07+02:00
[XMP:XMP-photoshop] DateCreated : 2024:09:07 14:52:13.23+01:00
[XMP:XMP-xmpMM] HistoryWhen : 2025:04:14 10:34:07+02:00
[Composite] SubSecCreateDate : 2024:09:07 14:52:13.23+01:00
[Composite] SubSecDateTimeOriginal : 2024:09:07 14:52:13.23+01:00
[Composite] SubSecModifyDate : 2025:04:14 10:34:07+02:00
[Composite] DateTimeCreated : 2024:09:07 14:52:13+01:00
[Composite] DigitalCreationDateTime : 2024:09:07 14:52:13+01:00
[File:System] FileModifyDate : 2025:04:14 10:34:06+02:00
[File:System] FileAccessDate : 2025:04:14 10:34:06+02:00
[File:System] FileCreateDate : 2025:04:14 10:34:06+02:00
[EXIF:IFD0] ModifyDate : 2025:04:14 10:34:07
[EXIF:ExifIFD] DateTimeOriginal : 2024:09:07 14:52:13
[EXIF:ExifIFD] CreateDate : 2024:09:07 14:52:13
[EXIF:ExifIFD] OffsetTime : +02:00
[EXIF:ExifIFD] OffsetTimeOriginal : +01:00
[EXIF:ExifIFD] OffsetTimeDigitized : +01:00
[EXIF:ExifIFD] SubSecTimeOriginal : 23
[EXIF:ExifIFD] SubSecTimeDigitized : 23
[IPTC] DateCreated : 2024:09:07
[IPTC] TimeCreated : 14:52:13+01:00
[IPTC] DigitalCreationDate : 2024:09:07
[IPTC] DigitalCreationTime : 14:52:13+01:00
[ICC_Profile:ICC-header] ProfileDateTime : 1998:02:09 06:49:00
[XMP:XMP-xmp] ModifyDate : 2025:04:14 10:34:07+02:00
[XMP:XMP-xmp] CreateDate : 2024:09:07 14:52:13.23+01:00
[XMP:XMP-xmp] MetadataDate : 2025:04:14 10:34:07+02:00
[XMP:XMP-photoshop] DateCreated : 2024:09:07 14:52:13.23+01:00
[XMP:XMP-xmpMM] HistoryWhen : 2025:04:14 10:34:07+02:00
[Composite] SubSecCreateDate : 2024:09:07 14:52:13.23+01:00
[Composite] SubSecDateTimeOriginal : 2024:09:07 14:52:13.23+01:00
[Composite] SubSecModifyDate : 2025:04:14 10:34:07+02:00
[Composite] DateTimeCreated : 2024:09:07 14:52:13+01:00
[Composite] DigitalCreationDateTime : 2024:09:07 14:52:13+01:00
bo0tzz
bo0tzz3w ago
Has the metadata extraction job finished yet? Immich reads a few fields in priority order, the first one it should be picking up is this one
[Composite] SubSecDateTimeOriginal : 2024:09:07 14:52:13.23+01:00
EmSixTeen
EmSixTeenOP3w ago
No description
Mraedis
Mraedis3w ago
I see XMP in those fields Did the XMP file get uploaded with your asset?
EmSixTeen
EmSixTeenOP3w ago
How would I know that? Immich is literally just pointed at the processed files folder
Mraedis
Mraedis3w ago
? Like an external library you mean
EmSixTeen
EmSixTeenOP3w ago
Yes I don't upload photos to Immich
Mraedis
Mraedis3w ago
Okay, well XMPs in external libraries should be supported, so you could check the library whether the XMP file is there and named aptly
EmSixTeen
EmSixTeenOP3w ago
Is that the actual problem here, or just something else which is also an issue? Also, fwiw, there are no .xmp files in the Processed folders Or anywhere that I can see in the raw file folders for that matter
Mraedis
Mraedis3w ago
Alright so it's put in the file then somehow, I wonder if the way they do that is 'correct'. Could you zip up an example and upload it here? Zipping part is important because discord strips all metadata
EmSixTeen
EmSixTeenOP3w ago
ehh I think this is a sidequest These are files exported from Lightroom, Lightroom embeds XMP metadata and doesn't create sidecar files
bo0tzz
bo0tzz3w ago
This is basic troubleshooting
EmSixTeen
EmSixTeenOP3w ago
It's usually the case that all thumbnails aren't generated when Immich picks up the files in the processed (external library) folder, and I've realised that I need to go and manually run the job (ie Jobs > Generate thumbnails > Missing) - it doesn't even say there's any jobs Active or Waiting though. I'm imagining here that this is another symptom of the same thing? If I run one of the other jobs do you think it'll pick up those other date fields, and sort appropriately?
Mraedis
Mraedis3w ago
So it finds the files and then doesn't do any thumb generation, metadata extraction... ?
EmSixTeen
EmSixTeenOP3w ago
After exporting photos from Lightroom to the folder that Immich uses as an external library those files show up in Immich, but most files have thumbnails and some don't. I realised running the job manually generates the missing ones, despite it not thinking there's any pending. Don't know about the metadata extraction - What should I expect to see, and where?
Mraedis
Mraedis3w ago
The external library is only updated once a day by default, are these pictures all exported at the same time?
EmSixTeen
EmSixTeenOP3w ago
I'm unsure what you mean, but after exporting a collection of photos they all come up in Immich, some with and some without thumbnails, all exported at the same time, with the missing thumbnails being sporadic and seemingly random.
Mraedis
Mraedis3w ago
And if you do "missing" on metadata extraction job for instance do all of them get fixed or are some still broken? I wonder if there's a couple of images breaking things
EmSixTeen
EmSixTeenOP3w ago
The 'Extract metadata' one? Let's run it and see.
Mraedis
Mraedis3w ago
In any case, there should be some output in the docker container logs
EmSixTeen
EmSixTeenOP3w ago
Took about 2 seconds and nothing changes
EmSixTeen
EmSixTeenOP3w ago
I'm running on unraid with: imagegenius/immich PostgreSQL_Immich If I go to the docker logs for the immich container I don't really see anything.
Mraedis
Mraedis3w ago
Did you restart docker here?
EmSixTeen
EmSixTeenOP3w ago
Extract metadata did nothing, but doing 'Rescan' on 'External libraries' seems to have picked up the correct dates and now I see camera info in the photos' info pane Now? Did before
Mraedis
Mraedis3w ago
at 10:57 AM whenever that was
EmSixTeen
EmSixTeenOP3w ago
It was an hour ago while trying to troubleshoot this, before either of you had yet replied, and nothing changed before or after that. ☝️
Mraedis
Mraedis3w ago
And did that produce any logs? 🙂
EmSixTeen
EmSixTeenOP3w ago
This is what's in there when I open the logs now, after manually running 'Rescan'
Mraedis
Mraedis3w ago
All I see is "36 updated" but not why/how they weren't before. Out of ideas for now, but do check the logs if you "upload" a new batch
EmSixTeen
EmSixTeenOP3w ago
I see that I have 'Library watching' turned on in the settings, with default settings for that, so that'll be why they're showing up right away at least - even if it's not 'right'. I wonder if it's viable for me to just reduce this scanning interval massively and if this scan's the same one as the external library rescan
No description
Mraedis
Mraedis3w ago
The watching should also see xmp files er They aren't xmp files Ah but perhaps it sees the original and not the edited one
EmSixTeen
EmSixTeenOP3w ago
nah the originals are in another folder not available to Immich. I'm imagining it might be that Immich is a little too eager to add the files, and they're not fully written or something at the time they're picked up
Mraedis
Mraedis3w ago
That's what I meant, it picks up a version, uploads, then ignores any ongoing edits
EmSixTeen
EmSixTeenOP3w ago
Yeah! Think that might actually be the case, just an educated guess more than anything
Mraedis
Mraedis3w ago
Easy to test 😛
bo0tzz
bo0tzz3w ago
AFAIK it should handle this and wait for a file to settle down before it pulls it in Oh nvm, seems like we don't set awaitWriteFinish. @etnoy is there a reason for that?
EmSixTeen
EmSixTeenOP3w ago
(I figure I need to wait on that response :D)
etnoy
etnoy4d ago
Where is this?
bo0tzz
bo0tzz4d ago
I really should've included that huh 🤦 Iirc in the opts for the file watcher Telling it to wait for a file to stop changing before it emits an event
etnoy
etnoy4d ago
Ok, I don't know, the file watcher is the ugly stepchild of external libraries Maybe it happened in my performance refactor
bo0tzz
bo0tzz4d ago
I could have a dig through the git history tomorrow if necessary
etnoy
etnoy4d ago
It's code that's very hard to test Maybe it's possible with e2e now but idk
bo0tzz
bo0tzz4d ago
So, searching through the whole history, the only mention of awaitWriteFinish is in #6192 but only in the form of a key at the top of server/src/infra/entities/system-config.entity.ts that, as far as I can tell, didn't actually get used anywhere
Immich
Immich4d ago
[Pull Request] feat(server): Automatic watching of library folders (immich-app/immich#6192)

Did you find this page helpful?