OK, I think I have solved this, but would like some feedback
In my template for the gallery thumbnail images, I entered a variable called imageID into the href string:
<div class="[[+cls]]">
<a href="[[~[[~262]]?&imageID=`[[+id]]`]]" title="[[+name]]">
<img data-href="[[+thumbnail]]" class="[[+imgCls]]" alt="[[+name]]" width="130" height="92"/>
</a>
<div class="clear"></div>
<h5>[[+name]]</h5>
</div>
(262 is the ID of my image-viewer resource)
I then created a snippet called get_image_id:
<?php
echo $_GET['imageID'];
And then in the image-viewer resource, I call the snippet to get the ID!
[[!GalleryItem? &id=`[[get_image_id]]` &toPlaceholders=`1`]]
This assumes the premise that the images are given a unique ID number as they are loaded (which it appears they do), and of course, makes sense.
So, is this how other people have done/do this?
Thanks
Daz