Member
Member
darkufo   2012-01-25, 22:57
#1

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%201.05%20-%20Guy%20Hastings/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

Member
Member
darkufo   2012-01-25, 23:00
#2

I just found out how to clear cache. That seems to have fixed it for now.

Member
Member
sbillard   2012-01-26, 00:46
#3

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.

Member
Member
darkufo   2012-01-26, 00:51
#4

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]

Administrator
Administrator
acrylian   2012-01-26, 15:35
#5

@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).

Member
Member
darkufo   2012-01-26, 17:35
#6

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.

Administrator
Administrator
acrylian   2012-01-26, 18:02
#7

Sure, the principle is the same for all files and it can only be done like you did via htaccess.

Member
Member
sbillard   2012-01-26, 18:19
#8

@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.)

Administrator
Administrator
acrylian   2012-01-26, 18:33
#9

@sbillard. Was not meant as "lecturing"...

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.