Template:ImageLinkTV/doc
From Tardis Wiki, the free Doctor Who reference
{{StoryImages}} is a template that works differently in different namespaces. In the category namespace it provides a link to the story page from which the images are drawn. In the main namespace, it provides a little tag that looks like this: Users can then click on that image and go to the relevant category of images.
Usage
Usage is easy. Just place {{StoryImages}} on both the story page and the related category page. So, you'd put {{StoryImages}} on both Castrovalva (TV story) and Category:Castrovalva TV story images.