When checking out one of my favourite webdesign sites, A list apart (which i can really recommend for their CSS articles) i found there an article on the topic of image linking by other sites.

He brings up an issue i forgot to mention:

You cannot tell the difference of someone linking you via an tag, or by using an tag. While you might not allow your images to be embedded in a foreign site, you may still want to allow normal links.

They present a php script and a rewrite rule to solve this: whenever the image is “hotlinked” from a different site, it is rewritten to a PHP script which then generates a HTML page presenting the real image. Since you can’t - for now - use a HTML page in an img tag this will cause a broken-image icon to be displayed. But when someone follows a link to the image, he will be able to see it.

This probably is a good solution for image galleries. Instead of generating a “wrapper html page” you could probably also write a temporary redirect to the correct gallery page. (I don’t know about the no-cache pragma effects for this… you might need to use meta refresh. and you’ll need to write logic how to redirect users to the proper gallery page)

They also explicitely allow google to refer to your images. Which is especially nice for google cache. (And you can probably block google an other image search engines better using robots.txt)