Sorting images, adding a link