Use sort for image history