Sorts positioning of images.