album sort doesn't respect time part on web #8208

Open
opened 2026-02-05 13:35:55 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @waclaw66 on GitHub (Jan 6, 2026).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Album sort by newest/oldest asset doesn't respect timestamp of an asset, it uses endDate or startDate attribute of an album which doesn't have the time part. Therefore albums are sorted randomly within a single day.

		"startDate": "2026-01-04T00:00:00.000Z",
		"endDate": "2026-01-04T00:00:00.000Z",

It works well on mobile, because it queries newest/oldest date from the asset. However it is very slow because every album is checked by a separate query.

Albums ordering should be cosolidated to use the same way of sorting.

The OS that Immich Server is running on

Fedora 43

Version of Immich Server

v2.4.1

Version of Immich Mobile App

v2.4.1

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

not relevant

Your .env content

not relevant

Reproduction steps

  1. Create a new album "First" of two photos from the same day.
  2. Create a second album "Second" of the older photo from the previous album.
  3. Set sorting by newest photo, those albums should be shown in the order First, Second, but it's not on web.
    ...

Relevant log output


Additional information

No response

Originally created by @waclaw66 on GitHub (Jan 6, 2026). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Album sort by newest/oldest asset doesn't respect timestamp of an asset, [it uses](https://github.com/immich-app/immich/blob/984f06ac4087c426013b7f6ff3ebd9f05358435d/web/src/lib/utils/album-utils.ts#L245) `endDate` or `startDate` attribute of an album which doesn't have the time part. Therefore albums are sorted randomly within a single day. ``` "startDate": "2026-01-04T00:00:00.000Z", "endDate": "2026-01-04T00:00:00.000Z", ``` It works well on mobile, because [it queries](https://github.com/immich-app/immich/blob/984f06ac4087c426013b7f6ff3ebd9f05358435d/mobile/lib/domain/services/remote_album.service.dart#L176) newest/oldest date from the asset. However it is [very slow](https://github.com/immich-app/immich/issues/25071) because every album is checked by a separate query. Albums ordering should be cosolidated to use the same way of sorting. ### The OS that Immich Server is running on Fedora 43 ### Version of Immich Server v2.4.1 ### Version of Immich Mobile App v2.4.1 ### Platform with the issue - [ ] Server - [x] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML not relevant ``` ### Your .env content ```Shell not relevant ``` ### Reproduction steps 1. Create a new album "First" of two photos from the same day. 2. Create a second album "Second" of the older photo from the previous album. 3. Set sorting by newest photo, those albums should be shown in the order First, Second, but it's not on web. ... ### Relevant log output ```shell ``` ### Additional information _No response_
OVERLORD added the 🗄️server label 2026-02-05 13:35:55 +03:00
Author
Owner

@Wezea commented on GitHub (Jan 6, 2026):

I can confirm this.

@Wezea commented on GitHub (Jan 6, 2026): I can confirm this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#8208