Photos App not sorting HEIC images by metadata date

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes, but this is also the first time I use NextCloud…
  • When did this problem seem to first start?
    • As soon as I started using Photos, about 1 week ago…
  • Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using Cloudflare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

While Photos is clearly sorting many images by the Creation date taken from the metadata of the files, it is failing to do so for HEIC images. It also fails for images that might have less complete metadata than provided by modern digital cameras, e.g. scanned images.

Steps to replicate it (hint: details matter!):

  1. Import an HEIC image
  2. Import a scanned image
  3. See images in Photos where they will be “listed” with a date equal to the time they were imported, rather than when they were created.

Log entries

I’m new so not sure which logs would be relevant…

I have the same problem, running Nextcloud on TrueNAS. I wonder whether it’s about some codecs missing?

Hi all
adding my similar, but perhaps more general question here. Perhaps we get the next steps into it.

I recently migrated my +30k photos from iCloud (.heic, .jpg, .mov, .mp4) and currently I am testing the photos and memories apps.

Memories is fine, it reads the “display-date” from the photo’s EXIF data, but the photos app seem to read the linux ctime (change time) of each file. Since I imported all photos from my Mac into my Linux server running Nextcloud, in the photos app every photo is sorted into this one day I imported them.

So I’d like to hear if my assumption is true that the photos app (only) reads the ctime of a file to sort it into the timeline? For a file browser it makes sense, but for migrating (all your) photos to Nextcloud there might be some other values to pick from.
I already changed all the mtime (modification date) of the photo files with exiftool, but it gets not read by the photos app.

I’d like to have my photos sorted in Photos App because Memories does not offer a iOS app. Therefore I would use the Nextcloud App with the Media tab on my phone to (re)view my photos and show them to others

Thanks for getting some insights how Photos app is reading the date of each photo in order to sort them in the right way.

Regards
Frank

I have the same issue but with different formats. The following works for me:

Using exiftool, the timestamp for File Modification Date/Time must be correct.
Then, using files:scan<vaule> --generate-metadata, the data should be updated accordingly.