Sgt_Kickaxe - 9:20 pm on Dec 19, 2012 (gmt 0)
Huskypup, your code whitelists the search engines to hotlink your image. If you use the code you provided, minus the whitelisting, and ALSO have the X-Frame-Options SAMEORIGIN set in headers to prevent your site being framed, then the visitor cannot see the image if they click on Google's "view full size" link or "Website for this image" link(they can if they just click the x in the top right corner of the image, the problem occurs with the links). The visitor's browser(Firefox) apparently picks up the block and their browser cache serves up a broken image even when they are on your site afterwards, unless you do not allow browser caching of images(which you should).
I was *hoping* for a way that still blocks the search engines from hotlinking but without resulting in a visitor browser being unable to see the image even if they visit your site afterwards. Getting rid of the X-Frame-options sameorigin is not an option.
Remember: If you block search from hotlinking they will still show your image but will use their own cache copy instead of your original. That stops hotlinking even more. Let the scrapers hotlink Google's copy of your images if they want... it makes for a much quicker trip out of the serps for the scraper.
I'm looking for this solution because I don't even want the image url on the scraper site, some of my images are being hit by Google's new safesearch approach (off or explicit only, there is no more moderate on .com). Hotlink protection alone wasn't enough to disassociate my image from the content on the scrapers site, just having a non-adult image url on an adult site is apparently enough to cause that image some rating issues.
I hope that better explains the problem. This *feels* like something Google would have to fix on their end.
edit: huskypup, using your code, if you also prevent the framing of your site on other sites using an X-Frame-Options SAMEORIGIN header the visitors who see your images on google.ca (or any other country) will have the problem I'm describing.