Yes, of course that is the standard loop on a standard theme. But that's end of the line, The logic of fetching and sorting happens deeper in core.
`next_image` uses:
- the album class methid `getImages()` (if we stay with normal album context)`
- which uses the album class method `sortImageArray()`
- which uses the functions.php function `sortByKey()`
- which - surprise - uses the functions.php function `sortArray()` which features the collator class change I am talking about and which I could reprodue the issue with.. For title and description it uses the function `sortMultingualArray()` which also uses `sortArray()`.
So we need an option respectively options so users can choose which "natural order" they want. Wht works for filenames with dates does not work for say French languagle titles. Again we added this to fix a sorting bug. But becuase of the strange behaviour we missed that it breaks sorting by date. We had test array where all dates were correcty, just some were not without any visible reason.
Or we make a coded exception only for date sorting. But then filenames with a date will still not work properly
Blame it on PHP that offers standard natural order that is not language aware and then introduces an extra class which also does not work completely as expected.
FYI the array comparison of the issue:
https://www.zenphoto.org/test/collator-vs-natcasesort-datesorting.jpg.html