[BUG] Photos and Videos appear under different date than the correct ones - how do I ask Immich to re-check the metadata ? #1103

Closed
opened 2026-02-05 00:28:38 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @andyxpert on GitHub (Jul 14, 2023).

The bug

I found out that some videos and photos from my drive were shown in Immich under wrong dates. Videos were transcoded locally by a script - hence the wrong dates - and images were moved from one folder to another - probably this also tricked Immich.
Anyway, thankfully I had the original date/time in the filenames so I ran a script to update all the metadata for all the files with the correct dates and now I want Immich to "re-evaluate" them and show them under the correct dates.
I tried running the jobs (Extract Metadata and Sidecar Metadata) with no luck, files still appear under wrong dates.
How can I ask Immich to re-evaluate all the dates in the library without removing everything and re-adding all of them (as it takes a lot of time to reset the entire library from scratch).

Is there a DB table I need to clean to make Immich "forcefully" re-evaluate the files' dates ?

The OS that Immich Server is running on

Linux Ubuntu

Version of Immich Server

v1.66.1

Version of Immich Mobile App

--- I use the web version, mobile doesn't matter for this issue

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

again irrelevant

Your .env content

irrelevant

Reproduction steps

N/A

Additional information

Immich ROCKS !!! I tried half-a-dozen similar solutions and Immich is by far the best, fastest and most robust of them all. Runs perfectly on a low-end server and allows me to control its behind-the-curtains processes. Very big thumbs-up !!

Originally created by @andyxpert on GitHub (Jul 14, 2023). ### The bug I found out that some videos and photos from my drive were shown in Immich under wrong dates. Videos were transcoded locally by a script - hence the wrong dates - and images were moved from one folder to another - probably this also tricked Immich. Anyway, thankfully I had the original date/time in the filenames so I ran a script to update all the metadata for all the files with the correct dates and now I want Immich to "re-evaluate" them and show them under the correct dates. I tried running the jobs (Extract Metadata and Sidecar Metadata) with no luck, files still appear under wrong dates. How can I ask Immich to re-evaluate all the dates in the library without removing everything and re-adding all of them (as it takes a lot of time to reset the entire library from scratch). Is there a DB table I need to clean to make Immich "forcefully" re-evaluate the files' dates ? ### The OS that Immich Server is running on Linux Ubuntu ### Version of Immich Server v1.66.1 ### Version of Immich Mobile App --- I use the web version, mobile doesn't matter for this issue ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML again irrelevant ``` ### Your .env content ```Shell irrelevant ``` ### Reproduction steps ```bash N/A ``` ### Additional information Immich ROCKS !!! I tried half-a-dozen similar solutions and Immich is by far the best, fastest and most robust of them all. Runs perfectly on a low-end server and allows me to control its behind-the-curtains processes. Very big thumbs-up !!
Author
Owner

@alextran1502 commented on GitHub (Jul 14, 2023):

If you move the image from one folder to another manually, it won't be updated in the Immich database, unfortunately. So that even if you run the metadata extraction or sidecar job, it cannot find the file to proceed. I suggest remove those wrong files on the web and then find them and reupload them again

@alextran1502 commented on GitHub (Jul 14, 2023): If you move the image from one folder to another manually, it won't be updated in the Immich database, unfortunately. So that even if you run the metadata extraction or sidecar job, it cannot find the file to proceed. I suggest remove those wrong files on the web and then find them and reupload them again
Author
Owner

@andyxpert commented on GitHub (Jul 14, 2023):

Quick response, total appreciation !!
Ok, got it about moving files, makes sense in a way... once they're in the DB and have thumbnails generated makes sense to stop checking their paths.
But my problem is their dates... I found inconsistencies between the created/modified dates of the image files vs their exif data and filenames (date/hour included in filenames). So i ran a script to correct the file created/modified dates.
Is there any way I can make Immich update all the files in gallery and re-grab their dates so they appear correctly in the timeline ? Something like updateMetadata or rescanAllFiles that update the files' dates based on exif or the actual file properties ?
I'm looking for a job/process that goes through all files and update the stored details in the DB (date mainly)

Also, let me decide when the issue can be closed... or at least ask me whether I'm ok to close it...
To consider this issue closed I need:

  • you to understand the issue (so far you only answered partially to the moving of files - fully agree with you)
  • to have an answer to the date/time update through any means possible so I avoid the time-consuming operation of clearing the reimporting of all files
@andyxpert commented on GitHub (Jul 14, 2023): Quick response, total appreciation !! Ok, got it about moving files, makes sense in a way... once they're in the DB and have thumbnails generated makes sense to stop checking their paths. But my problem is their dates... I found inconsistencies between the created/modified dates of the image files vs their exif data and filenames (date/hour included in filenames). So i ran a script to correct the file created/modified dates. Is there any way I can make Immich update all the files in gallery and re-grab their dates so they appear correctly in the timeline ? Something like updateMetadata or rescanAllFiles that update the files' dates based on exif or the actual file properties ? I'm looking for a job/process that goes through all files and update the stored details in the DB (date mainly) Also, let me decide when the issue can be closed... or at least ask me whether I'm ok to close it... To consider this issue closed I need: - you to understand the issue (so far you only answered partially to the moving of files - fully agree with you) - to have an answer to the date/time update through any means possible so I avoid the time-consuming operation of clearing the reimporting of all files
Author
Owner

@andyxpert commented on GitHub (Jul 16, 2023):

Also... Does Immich use only the file creation date or does i grab the date from Exif data ?

@andyxpert commented on GitHub (Jul 16, 2023): Also... Does Immich use only the file creation date or does i grab the date from Exif data ?
Author
Owner

@jrasm91 commented on GitHub (Jul 16, 2023):

We use date fields from exif and fallback to the file timestamps if it doesn't have any dates in exif.

@jrasm91 commented on GitHub (Jul 16, 2023): We use date fields from exif and fallback to the file timestamps if it doesn't have any dates in exif.
Author
Owner

@andyxpert commented on GitHub (Jul 16, 2023):

We use date fields from exif and fallback to the file timestamps if it doesn't have any dates in exif.

Great news (as expected somehow), how can I trigger some job to refresh this data for all files ? I have some files positioned wrongly in timeline and I can alter the files but I can't make Immich pick up the changes.

@andyxpert commented on GitHub (Jul 16, 2023): > We use date fields from exif and fallback to the file timestamps if it doesn't have any dates in exif. Great news (as expected somehow), how can I trigger some job to refresh this data for all files ? I have some files positioned wrongly in timeline and I can alter the files but I can't make Immich pick up the changes.
Author
Owner

@jrasm91 commented on GitHub (Jul 16, 2023):

On the web, you can go to administration > jobs > and run the extract metadata for all

@jrasm91 commented on GitHub (Jul 16, 2023): On the web, you can go to administration > jobs > and run the extract metadata for all
Author
Owner

@andyxpert commented on GitHub (Jul 17, 2023):

Finally it's ok... I was missing some dates in the exif of the "irregular" files and Immich defaulted to file creation time (not modified) which was wrong due to them being moved.

had to overwrite the exif dates and then Immich's "Extract Metadata" worked.

thanks for the details, @jrasm91 .
Now the issue is done :)

@andyxpert commented on GitHub (Jul 17, 2023): Finally it's ok... I was missing some dates in the exif of the "irregular" files and Immich defaulted to file creation time (not modified) which was wrong due to them being moved. had to overwrite the exif dates and then Immich's "Extract Metadata" worked. thanks for the details, @jrasm91 . Now the issue is done :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1103