click on an image to open a gallery