Add Date/Time informtion to metadata stripped images (Whatsapp, SIgnal etc.)

Problem:

I use Whatsapp a lot, and the issues with these images is that the metadata is completely stripped. Right now I am not sure what exact metadata Immich uses for the date (maybe modified date…).

The problem is that when these images are moved around or edited, there is a tendency for the modified date etc. to change. This is something that happened to all my photos on google photos. And when transitioning to Immich, I had a hard time fixing the dates for all of them.

Based on whatever research I did, the best way is to set the DateTimeOriginal tag for images, and CreateDate for videos.

Request:

My request is to basically get all the images that do not have a Date metadata field, and add that field = <the date immich has in its database for that image>. I know this is not perfect, the date Immich has might not be perfect, but would at least be something in the similar timeframe as that image.

I am not confident on what tags are the best to use - maybe someone with a better understanding can help here. But from what I know:

  • Images (HEIC, JPEG …) → DateTimeOriginal

  • PNG files (all the screenshots taken on IOS are pngs) → CreationDate

  • Videos (MP4, MOV …) → CreateDate

NOTE:

I am sure there is a better solution. My high level request is to help address the issues that comes with metadata stripped images from whatsapp, signal, etc. And solution is helpful.