@EnergyHandyman - The sort order you are seeing is expected. Using the exact example you have the sort value of "1" is before the sort value "10" but this is not due to the ordinal value of the numbers but because "1 " (note the space after the 1) is a "lower" value than "10".

This carries forward for the values used at "... 16 17 2 3..." where "17" is a "lower" value than "2" (or "2 " to make the comparison items equivalent). In this case, the "1" of the "17" is compared to the "2" directly and "1" is lower so it comes first.

Unfortunately this is a common "computer sorting" issue and is usually best to work with numeric file names that are of equal length, so for your example "01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17" would sort in precisely that order.

If you are importing your images with their meta data, you should be able to sort your galleries by date/time and get the order you are expecting provided you are "numbering" your images in a chronological sequence.

I hope that helps to sort (oops, no pun intended) out this for you.

Thanks!

- Cais.