Protect your Art From Unauthorized Downloads

Harold Dumas

Hi everyone, one of the hardest issues to deal with as an artist or photographer is having someone download your work, from your website, without permission . Some sites protect your work while many do not. 

My site does not. My first option was to use watermarks. There are plenty of apps that add watermarks for you. Simple right! The problem I found is that they are ugly and distracting to your work. I eventually got rid of the

watermarks after finding this piece of generic code that disables right click so that images cannot be saved. 


Oh, and by the way there are apps to remove the watermarks that we go through so much trouble to add.

Also if someone is determined to get your work they will probably succeed, but for the general user this code will stop them.


Just enter the code below in your header and every page will be protected. I've had the code in place for 2 months and it works like a charm. If you're on my site reading this piece click on one of my images to test it. Anyway, if you hate watermarks and don't like the possibility of your work being downloaded without your permission give this code a try.


Thanks, for reading

Harry


Code:

 <!-- Following code will prevent right click on images place is just above closing </body> tag -->

<script>


document.oncontextmenu = function(e){

var target = (typeof e !="undefined")? e.target: event.srcElement

if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))

return false


}


</script>

<!-- code to prevent right click ends ---here -->

 

Back to blog

Leave a comment