Just realised what I’m doing wrong! Need to add the shortcode as html rather than adding the link to an existing button.
Don’t worry. I’ve fixed it. All working fine.
To make this clearer. When you click on a thumbnail, the image title for that image will appear as a caption above or below.