Discouraging users from copying images off a website?

There is no way to block saving of images, but here are some ideas to make it harder.

  • To prevent right-clicking the image to save it, you can overlay a transparent div on it. The user will then right-click the div instead of the image below it and the context-menu will not show "Save image as".
  • You could use a data URL to show the image so that there is no separate file on the server to link to.
  • You could use hotlink protection by checking the referer before serving images.

Even with all these countermeasures, any user can just make a screenshot of the page and crop the image out of it.

Given it is very easy to bypass these countermeasures, you may consider not implement any anti-downloading functionality at all. Use of the images is already protected by law.


You are seeking a technical solution to a social problem, if you want to call it one, which is often folly.

One of the fundamental rules of security is that once you give the user something, they have it. Obfuscation and client-side "protection" (AKA DRM) do not work.

If you want to display an image on user's screen screen, them saving that image can be no harder than print screen and opening paint. No matter how intolerable you make your website, you cannot sidestep the fact they already have the image.

So the question is why you would go out of your way to make the website less usable to prevent what you already cannot. All of the normal tactics, like blocking right click, obfuscating the HTML-CSS, using flash, etc. have major usability implications. Going off the rails with some of the more extreme solutions suggested begin to present performance and compatibility problems.

And all this you're asking the user to deal with. I can't speak for everyone, but I refuse to visit any site that begins tampering with my input. I consider right click blocking one of the greatest sins on the internet, and it's a practice that simply needs to end. We don't need new and innovative ways to annoy the user.


If your problem is actually "convincing your client," try this thought experiment:

  • Put a cartoon on a web page with a red border around it and a few diagonal stripes to partly obscure the image (just enough to make it ugly but still legible).
  • Tell your client, "I've added unbreakable copy protection."
  • Give your client a piece of paper and a pencil and ask them to freehand a copy of the cartoon.

It may be too depressing to them (so think twice before trying it), but will drive home the magnitude of what they're asking you to do. The ease of copying someone else's hard work is why Intellectual Property laws exist.

Very applicable to your current situation: in the USA, characters from the popular Calvin and Hobbes comic strip are commonly seen, even though the creator has steadfastly refused to license them. But they're easy to copy, and the IP is difficult (and expensive) to enforce. Your best bet will probably be a social solution: convincing the users that it's in their own best interest to not copy the images

I know that's not the answer you want, and I'm sorry.