#Add support of WhatsApp media

1 messages · Page 1 of 1 (latest)

atomic shell
#

While using Immich, I encountered an issue reported by other users: media uploaded from the Immich mobile app doesn't appear at the correct date in the timeline when it originates from WhatsApp. This is because WhatsApp removes all EXIF metadata, including the original creation date.
On iOS, I found that Apple stores the date a photo or video was saved to the device, which usually reflects the actual capture date. This value can even be edited manually — and, most importantly, Apple exposes it through an API.

With that discovery, I attempted to implement a solution and submitted a pull request (#18243). My approach involved detecting media files likely originating from WhatsApp using several heuristics (UUID filenames, absence of EXIF metadata, etc.). I then used the iOS API to retrieve the original creation date stored by the system and wrote this value back into the file’s metadata before upload.
However, the pull request was declined due to the policy of not modifying the original files, as this increases the risk of data loss.

I understand that decision from a technical standpoint, but I honestly don’t see many other ways to properly fix this issue. No matter what, the creation date will have to be extracted directly from the mobile app, since it’s the only place where that information still exists. The real challenge is figuring out where and how to make use of that date — and that’s the part I haven’t been able to solve yet.

I'm open to any ideas or discussions on how to solve this issue. I believe it's important to address in order to ensure that all media is correctly stored and organized in Immich, which is one of the app's core goals.

kindred fieldBOT
halcyon oxide
#

This would be better suited for a third party tool which uses the immich API to find the files of interest and use a PUT /assets/:id to update the dateTimeOriginal

atomic shell
#

It means I need to dev an iOS app, that is gonna search for every WhatsApp media on the phone and then use the Immich API to update a field

#

A bit overkill for a third party tool just to solve that issue when the Immich app is capable of doing it at the time it download the file

halcyon oxide
#

uh, no, it would run on the command line a la immich-go , immich power tools, immich-kiosk, etc ?

#

Nothing you are doing in the mobile app actually needs to be done in the mobile app

#

It's just setting a date from the filename. That can easily be done on a server as a scheduled job

atomic shell
#

I didn't think of that, I will look into it.

#

Thanks for the idea

sacred isle
#

Somewhat related, I built a WhatsApp image uploader which groups images into albums based on the chat name and sets the date using the filename. It reads from the message database so there's the possibility to include other info in the upload such as caption or the name of the person who posted it. https://github.com/exciton/whatsapp-to-immich