Querying media-url only if there are images, adding a link to the images, and fixing a test