Wrong date from images without exif data (only on mobile app) #2827

Closed
opened 2026-02-05 07:05:37 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @SerAlbi on GitHub (Apr 9, 2024).

The bug

Hello everyone,
I encountered a problem with Immich: while uploading a photo from the mobile app if the file has no exif creation date the file is positioned in the timeline at the date in which is uploaded.

I read similar issues but this is somewhat different: the issue is only with images without valid exif data like whatsapp images or other jpgs and only in the mobile app. (The phone's gallery app can correctly displays the file capture date which i guess can only be retrieved correctly from the last modified date).

This issue is not present with the web version: if i load the same file, the date is correctly retrieved from the file metadata and the photo is displayed at the right date in the timeline.

This is the exif data of the photo i'm trying to upload:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> </head>
Property Value
SourceFile /storage/emulated/0/DCIM/Camera/Lumii_20240124_180233537.jpg
ExifToolVersion 12.68
FileName Lumii_20240124_180233537.jpg
Directory /storage/emulated/0/DCIM/Camera
FileSize 4.1 MB
FileModifyDate 2024:01:24 18:02:35+01:00
FileAccessDate 2024:03:27 14:00:52+01:00
FileInodeChangeDate 2024:03:28 02:12:43+01:00
FilePermissions -rw-rw----
FileType JPEG
FileTypeExtension jpg
MIMEType image/jpeg
JFIFVersion 1.01
ResolutionUnit None
XResolution 1
YResolution 1
ImageWidth 3024
ImageHeight 4032
EncodingProcess Baseline DCT  Huffman coding
BitsPerSample 8
ColorComponents 3
YCbCrSubSampling YCbCr4:4:4 (1 1)
ImageSize 3024x4032
Megapixels 12.2
</html>

The only correct date is FileModifyDate and i guess this is used in some way in the web version but not from the mobile app?

Speculation: I read that immich uses many Exif dates in a 'priority order' wouldn't it make more sense to just get all the exif Date values and just pick the least recent date? Surely that would be the 'original' date if not manipulated by any other tool am I wrong?

The order i see is this:

/** look for a date from these tags (in order) */
const EXIF_DATE_TAGS: Array = [
'SubSecDateTimeOriginal',
'DateTimeOriginal',
'SubSecCreateDate',
'CreationDate',
'CreateDate',
'SubSecMediaCreateDate',
'MediaCreateDate',
'DateTimeCreated',
];

But I don't see any 'FileModifyDate' used.

This is the image i'm trying to upload but I think that uploading it here will scramble the FileModifyDate metadata:
Lumii_20240124_180233537

The OS that Immich Server is running on

Windows 11

Version of Immich Server

v1.101.0

Version of Immich Mobile App

v1.101.0 build.131

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Irrelevant

Your .env content

Irrelevant

Reproduction steps

1. Upload file without valid Exif dates from mobile app
2. See that is placed incorrectly in the timeline
3. Remove file
4. Load the same file from web interface
5. See that is placed correctly in the timeline

Additional information

No response

Originally created by @SerAlbi on GitHub (Apr 9, 2024). ### The bug Hello everyone, I encountered a problem with Immich: while uploading a photo from the mobile app if the file has no exif creation date the file is positioned in the timeline at the date in which is uploaded. I read similar issues but this is somewhat different: the issue is only with images without valid exif data like whatsapp images or other jpgs and only in the mobile app. _(The phone's gallery app can correctly displays the file capture date which i guess can only be retrieved correctly from the last modified date)._ This issue is not present with the web version: if i load the same file, the date is correctly retrieved from the file metadata and the photo is displayed at the right date in the timeline. This is the exif data of the photo i'm trying to upload: <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 15"> <link id=Main-File rel=Main-File href="file:///C:/Users/UNS01860/AppData/Local/Temp/msohtmlclip1/01/clip.htm"> <link rel=File-List href="file:///C:/Users/UNS01860/AppData/Local/Temp/msohtmlclip1/01/clip_filelist.xml"> </head> <body link="#467886" vlink="#96607D"> Property|Value -- | -- SourceFile | /storage/emulated/0/DCIM/Camera/Lumii_20240124_180233537.jpg ExifToolVersion | 12.68 FileName | Lumii_20240124_180233537.jpg Directory | /storage/emulated/0/DCIM/Camera FileSize | 4.1 MB FileModifyDate | 2024:01:24 18:02:35+01:00 FileAccessDate | 2024:03:27 14:00:52+01:00 FileInodeChangeDate | 2024:03:28 02:12:43+01:00 FilePermissions | -rw-rw---- FileType | JPEG FileTypeExtension | jpg MIMEType | image/jpeg JFIFVersion | 1.01 ResolutionUnit | None XResolution | 1 YResolution | 1 ImageWidth | 3024 ImageHeight | 4032 EncodingProcess | Baseline DCT  Huffman coding BitsPerSample | 8 ColorComponents | 3 YCbCrSubSampling | YCbCr4:4:4 (1 1) ImageSize | 3024x4032 Megapixels | 12.2 </body> </html> The only correct date is **FileModifyDate** and i guess this is used in some way in the web version but not from the mobile app? **Speculation:** I read that immich uses many Exif dates in a 'priority order' wouldn't it make more sense to just get all the exif Date values and just pick the least recent date? Surely that would be the 'original' date if not manipulated by any other tool am I wrong? The order i see is this: > /** look for a date from these tags (in order) */ > const EXIF_DATE_TAGS: Array<keyof Tags> = [ > 'SubSecDateTimeOriginal', > 'DateTimeOriginal', > 'SubSecCreateDate', > 'CreationDate', > 'CreateDate', > 'SubSecMediaCreateDate', > 'MediaCreateDate', > 'DateTimeCreated', > ]; But I don't see any '**FileModifyDate**' used. This is the image i'm trying to upload but I think that uploading it here will scramble the **FileModifyDate** metadata: ![Lumii_20240124_180233537](https://github.com/immich-app/immich/assets/24434712/3e02c560-217b-44ea-a915-ac70f87f4f40) ### The OS that Immich Server is running on Windows 11 ### Version of Immich Server v1.101.0 ### Version of Immich Mobile App v1.101.0 build.131 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML Irrelevant ``` ### Your .env content ```Shell Irrelevant ``` ### Reproduction steps ```bash 1. Upload file without valid Exif dates from mobile app 2. See that is placed incorrectly in the timeline 3. Remove file 4. Load the same file from web interface 5. See that is placed correctly in the timeline ``` ### Additional information _No response_
OVERLORD added the date-time label 2026-02-05 07:05:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2827