You could do it via .htaccess file. Put this rules into your .htaccess file and upload it to your main site html folder (or if you have .htaccess there then just add this lines): ## SITE REFERRER BANNING RewriteEngine on RewriteCond %{HTTP_REFERER} badsite1\.com [NC,OR] RewriteCond %{HTTP_REFERER} stupidsite2\.net [NC,OR] RewriteCond %{HTTP_REFERER} crazysite3\.org [NC] RewriteRule \.(jpg)$ - [F] Code (markup): this will block access for those specific sites, 1, 2 and 3 to your .jpg files. If you want to block them from access all other extensions then modify that last line to something like this: RewriteRule \.(jpg|jpeg|gif|png)$ - [F] Code (markup): that should do the trick.
Thank you pr0t0n, but somehow I can't get this working. After I put this, I was blocking my own site as well. I think this is for "allowed" sites not for "blocked" sites. Here is my .htaccess RewriteEngine on RewriteCond %{HTTP_REFERER} verybadsite\.com [NC,OR] RewriteRule \.(jpg|jpeg|gif|png)$ - [F] Code (markup): Please correct me if I am wrong. PS: It's working, I think I messed up with notepad++ (invisible breaks). Thank you once again pr0t0n, you got greenies!