#How to sort by date
1 messages · Page 1 of 1 (latest)
:wave: Hey @topaz narwhal,
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
.
References
- Container Logs:
docker compose logsdocs - Container Status:
docker compose psdocs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
Checklist
- :blue_square: I have verified I'm on the latest release(note that mobile app releases may take some time).
- :blue_square: I have read applicable release notes.
- :blue_square: I have reviewed the FAQs for known issues.
- :blue_square: I have reviewed Github for known issues.
- :blue_square: I have tried accessing Immich via local ip (without a custom reverse proxy).
- :blue_square: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
- :blue_square: 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.
Judging by the file name that seems to be a whatsapp video?
yeah
Whatsapp really butchers metadata, so it's expected to fail
Like, the image basically has nothing else except the filename
Only thing you can do is fix the metadata yourself beforehand, either with some script or by doing it manually
oh
so there's no way to make it automatic with immich? just by reading the file name
Nope. A file name isn't really explicit enough. There are like a million different ways of how you can write some sort of date in there, so it's really not something immich can/should fix
Just because you'd need to add edge cases for way too many services, and presumably also take care of different regions, idk
For instance the file name lacks a timezone
Or a time in general
So if I make a script that modifies the metadata of each image in the folder used by immich it wont break it right? like, the image hash or whatever mechanism immich uses to recognise an already uploaded image
You would need to upload the assets again for immich to recognize them
🥲
Or well, re-running metadata extraction should also fix it
oh
I've got a script that does that, but now I'm not sure on where to find the images to modify them... https://share.ldflabs.com/XuYA5/KURiFOdE60.mp4
this is not right, right?
The program I made looks for files like Pattern.compile("IMG-(\\d{8})-WA\\d+\\.jpg") as their name, extract the date and puts it in their metadata buuuuut now that i just need to run it, im not sure where are those images supposed to be 😅
Right, so you have two options Either fix the metadata beforehand and re-upload, or use the storage template to give the files their original name first
ugh im trying to understand how it works... (the storage template) do you know how could I do that?
also, is the folder here the right one? are those the photos? or just thumbnails?
upload are the originals
You need to be more specific about your question :D
ok srry ;)
My program can edit each .jpg metadata it finds, it worked on files with the name like IMG-20230707-WA0024.jpg but clearly immich renamed them all... (tell me pls if there are faster way to do this, it's just the first idea I've got).
So now I either can extract the date from the new name immich gave to the photos or I find a way to get them to have their old names back... You suggested me to use the storage template. Would it work with already stored images? how can I used it torename all the images to its orginal names?
After setting the storage template, you can run the storage template job (https://my.immich.app/admin/jobs-status) and it'll update all files
In storage template, you can make immich use the actual image name:
So..do that..then run storage migration job..then make your program edit those files
I'd add the "check the files got renamed" step but otherwise that sounds about right, yep
oks I'm baking upp everything and then I'll try this
Also - I use whatsapp extensively, so, I get your feeling.
I run this command using exiftool every month - to make sure all my whatsapp assests have the correct exif date.. It was a pain to fix all those images when I moved from google photos to immich.
LIBRARY_PATH="/mnt/user/images/immich/library"
For Images
exiftool "-alldates<filename" -r -P -overwrite_original -if '((not $datetimeoriginal) and ($filetype eq "HEIC" or $filetype eq "JPEG" or $filetype eq "jpg" or $filetype eq "scr"))' "$LIBRARY_PATH"
For videos
exiftool "-AllDates<filename" -r -P -api:QuicktimeUTC -api largefilesupport=1 -overwrite_original -if '(((not $Quicktime:CreateDate) or ($Quicktime:CreateDate eq "0000:00:00 00:00:00")) and ($filetype eq "MP4" or $filetype eq "MOV"))' "$LIBRARY_PATH"
PLEASE MAKE SURE YOU HAVE BACKUPS! AND TEST THESE COMMANDS BEFORE YOU RUN ON THE ENTIRE LIBRARY. It replaces the original assets with the edited one. So, there is always a chance to mess things up.
If you moved from google photos, you cou've also just used a google takeout and immich-go, no?
Or did they have the incorrect metadata in gphotos as well?
There was no immich-go at that time...my bad luck! lol
since there was no dateTimeOriginal, the only thing it had was 'FileModifiedDate' - that thing might change when you copy/move the files (not entire sure). And some tools I found online didnt do a good job
Yeah. Gphotos was also messed.
I hate it when photos are out of order..and there was no programatic way to edit photos exif in google photos (manually doing it was not an option)...
Then came this beautiful thing called Immich!
Ah, because it got added to gphotos immediately it was less broken, makes sense
Unfortunately it's still painful for an initial ingest, but I'd argue that we can't even do much about it
It's just whatsapp doing a really bad job (although you might say that's good with regards to privacy)
Yeap. Definitely good for privacy...My parents would just share their location to the world that way! haha
I mean... it's one thing stripping geodata and another stripping the creation date
But yeah
OK the files got renamed and the metadata should be updated too, what should I do to dell immich to reorder them now?
yeah, I think I just did it, it's working on it rn
@native bay Yeah. I use ios, and the file name is just a random id. But if you think the data shown on immich is correct, then the following will work.
Enable the storage template and use a format like:
{{y}}-{{MM}}-{{dd}}-T{{HH}}-{{mm}}-{{ss}}
You will get a file name like 2022-02-03-T04-56-05.jpg
Then you can use the commands I used to basically set all the exif tags from the filename set by immich. This is what I do, and it works great so far.