Blog > Disabling Hotlinked Images

I still remember the early years, when I found out that it was so easy to save any website’s images to disk and view other site’s code to get « inspiration ».
This was instrumental to the rapid growth of the web. You could be viewing anyone’s web site and check its code, examine it, learn from it, improve on it, then poublish it as your own. These days the reach of the network brings other problems and personal or commercial sites may not find that this practice is only flattery!
Although it’s considered bad ethics, modern browsers are far from preventing users from doing this. I’ve seen all kinds of protection schemes to prevent downloading of images, not only to prevent copyright violation but also bandwidth use: Javascript blocking your right button, Java applets containgin the images, even checking the referrers and manually changing your images so when they’re stolen, something else appears on your « enemy »‘s website…

Alex King mentions a little gem he found, a more elegant method of doing this, not only automatic but also permanent – you won’t have to think about it every time you add images to your site. It involves using the mod_rewrite module and appropriate rules to serve a different image than the one originally requested if the request comes from another site. Clever!

However this won’t stop the bandwidth from your site from being used… I’d advise if you follow this method make sure the replacement image has a very small footprint… 🙂 Blog > Disabling Hotlinked Images