Sort the image list.