You haven't mentioned where you want this link, so I'm going to assume you intend to place it within the StoryCaption or StoryMenu special passages. The passage tag to story variable bit is easy—though, I question if you need the story variable at all. Opening the image in a dialog is a bit more advanced, requiring the Dialog API.
For example, the following will use tags like Chapter# to create the image, which it opens in a dialog named Image:
<<link "Show Image">><<script>>
// Set up our variables.
var tag = tags().filter(function (tag) { return tag.startsWith('Chapter'); })[0].toLowerCase();
var src = 'images/' + tag + '.png';
// Set up the dialog and open it.
Dialog.setup('Image');
Dialog
.wiki('<img src="' + src + '">')
.open();
<</script>><</link>>
NOTE: The example does not set a story variable, as I'm unsure if you actually need it or only thought you did to achieve the result you wanted. If you actually do need it, let me know and I can add that to the example.
SEE: <<link>>, tags(), Dialog API.