Fix previous/next image links don't work if the image has no tags