If you have the thumbnail and image, it's just simple HTML.
<a href="image.jpg"><img src="thumbnail.jpg" alt="Image description"></a>
If you need to automagically generate the thumbnail, you might be looking at a third party thing (and are past my expertise.)