Help with Hotlinking Protection

Hi,

I'm struggling to understand how I can prevent sites hotlinking to the full image

For example. This is site seems to hotlinking directly

http://www.tvrockstars.com/alcatraz-spoilers-episode-1-05-guy-hastings-promotional-photos/

The image they are linking to is this one.

http://www.spoilertv.co.uk/images/cache/pilot-shows/alcatraz/season-1/promotional-episode-photos/Episode 1.05 - Guy Hastings/106Alcatraz-ep106_sc6_001_595.jpg

This is odd as in Options, Image I don't have Cached selected.

How can I stop this or clear the cache?

I'm very confused

Comments

  • I just found out how to clear cache. That seems to have fixed it for now.
  • There is no such image option for cached. Probably you are looking at the `cache the full image` option. That, as it says, applies to the full sized image.

    All resized images are cached by zenphoto to avoid overhead of having to process them each time a page was referenced. Since the viewing browser must be able to load the image there is really no way of preventing someone who knows of the image from hotlinking it. You can obscure the names, but that will not help if someone can browse your site.

    Anyway, if they can browse your site they can copy the image through any number of mechanisms--simplest is to get it from the local cache of their browser. Bottom line, if you can show the image on your site to the public, the public can capture the image and/or hotlink it.

    You should probably watermark the image so that it indicates its origin.
  • Thanks, I've manage to write a simple htaccess script to block the offending site.

    ## SITE REFERRER BANNING
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} tvrockstars\.com [NC]
    RewriteRule \.(jpg|png)$ - [F]
  • acrylian Administrator, Developer
    @sbillard: Hotlinking means of course referring to images directly on other sites like forums or blogs. This "steals" traffic and bandwidth and htaccess is indeed the way to prevent that. WE have a template file on the troubleshooting (don't remember where right now).
  • The thing is, is that we want the users to hotlink the thumbs that we generate but not the full

    ie images with 100_cw85_ch85_thumb etc are fine to hotlink.
  • acrylian Administrator, Developer
    Sure, the principle is the same for all files and it can only be done like you did via htaccess.
  • @acrylian

    There is no need to lecture me publicly here on the forum. I do indeed know what hotlinking is (probably better than you.) I was just trying to be helpful to darkufo.

    The .htaccess fix will work, but only for identified domains which is only a specific fix. Not a general solution (because as I said, there is no general solution.)
  • acrylian Administrator, Developer
    @sbillard. Was not meant as "lecturing"...
Sign In or Register to comment.