sort images by time