There are various ways to sort an image gallery. When a gallery is created the images are saved in the order that they are added, and the default sorting method is drag and drop.
Click on the sorting dropdown to change the sorting method.

Sorting Options
The following sorting options are available:
Drag and Drop
Drag the images into the order that you would like them to appear.
Filename Ascending / Descending
Sorts the images alphabetically by the filename.
Shoot Time Ascending / Descending
Sorts the images by the time the photo was taken.
Save Time Ascending / Descending
Sorts the images by the time the image file was saved.
Upload Time Ascending / Descending
Sorts the images by the time that they were uploaded to the website.