fix image links in popup viewer

Image links for previous and next image in image viewer do not work as in alix5 any more, i.e. no image for navigating to previous/next image is shown because the image URL is wrong. This pull request fixes that issue by generating the correct URL again.