The sort function is exhibiting unexpected behavior:
Each gallery I have contains images with numerical filenames, such as 1.jpg, 2.jpg, 3.jpg, etc. I would expect that sorting the gallery by filename (ascending) would list them in numerical order, but it doesn't. Instead I get 1.jpg, 10.jpg, 11.jpg, [etc], 2.jpg, 20.jpg, 21.jpg.... It seems like it's sorting each character in the filename separately. Can someone address this?