Pictures out of order after updating to Nextcloud 25.0.1

Nextcloud version: 25.0.1
Operating system and version: Truenas FreeBSD
Apache or nginx version: Not sure. Running it as a jailed plugin
PHP version: 7.4.15

The issue you are facing:

After updating my nextcloud instance from 24 to 25, my pictures are showing up out of order. For example, pictures from August are showing up before my Sept pictures. Same thing is happening on the iOS app, even though I sorted by creation date.

Is this the first time you’ve seen this error?: y

Steps to replicate it:

  1. Upload pictures
  2. Go to Photo

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => true,
    ),
  ),
  'trusted_domains' =>
  array (
    0 => '192.168.2.99',
    1 => 'nextcloud.local',
  ),
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'ocq2dmcg7494',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'version' => '25.0.1.1',
  'overwrite.cli.url' => 'redacted',
  'dbtype' => 'mysql',
  'dbname' => 'redacted',
  'dbhost' => 'redacted',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 1,
  'mysql.utf8mb4' => true,
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'redacted',
  'mail_smtppassword' => 'redacted',
  'mail_from_address' => 'admin',
  'mail_domain' => 'nextcloud.com',
  'mail_smtpsecure' => 'ssl',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\MarkDown',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\MSOffice2003',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\SVG',
    11 => 'OC\\Preview\\Font',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\Movie',
    14 => 'OC\\Preview\\MKV',
    15 => 'OC\\Preview\\MP4',
    16 => 'OC\\Preview\\AVI',
    17 => 'OC\\Preview\\HEIC',
  ),
  'default_phone_region' => 'CA',
);