Frequently Asked Questions:
Disabling right-click save on your blog images
One thing I get asked about fairly frequently is how to disable people from right-clicking and saving images from our blogs. After all, we post pretty big pictures that we’re hoping to get paid for, rather than having uncle Bob steal them off of our website and make a bunch of prints at WalMart.
The good news is, it is pretty easy to disable right-clicking for all your images in ProPhoto (or any other WordPress Theme for that matter).
To do it, just do the following: In your WP Admin panel, go to “Design” (called “Presentation” in WP 2.3.3 and earlier) –> “Theme Editor.” Then click on the file “Header” (or, header.php). Then look for this line of code:
<body class="<?php sandbox_body_class() ?>">
Delete that line and replace it with this line:
<body class="<?php sandbox_body_class() ?>" oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
Click to save your changes, and that should do it. This will disable people from right-clicking and saving any images, and dragging images off of your blog onto their computer. Unfortunatley, it will not prevent them from taking screen-captures of your images–but most people don’t know how to do this. This technique will probably stop 90% of the theft from your blogs.
Was this helpful? Let me know by commenting!
Questions? Instead of emailing for support, leave a comment below so everyone can benefit from any clarification.
Very helpful info Jared. It took me 2 minutes to make the change. Thank you for your great product!
thank you!!
thanks! great info!
Yay! I was just wondering how to do that. Thanks so much for posting it.
Thank you for this! And thank you for all your detailed help!
Best $94.00 I have spent all year! 
Cool! This seem to work on Safari and Mac’s too.
Very helpful!! Thanks a lot!
Excellent info. Thanks!
hey jared…it seems to deter the right click but i can still drag and drop the image into another folder on my desktop. Is there any way to correct this?
Agreed Steve. Stops the right click in from giving you the save as option. but windows still comes up with it’s icon to save or print??
Maybe I did it wrong?
from my computer, I can not right click or anything to save the images, but my friend can do it to my images from her computer. Sometimes you can left click and the nsave from that screen and sometimes if you just hold the cursor over the picture it gives you options to save and print and e-mail.
Thanks for having this tip so easily available!
I noticed that you can left click an image, which will open it, and then the right click disable does not work. Is there a way to disable left click opening?
I think you can disable left click by how you insert the image in wordpress. The default behavior is that the image embedded is a link to the actual image, but I think you can select for it not to be a link, and then people wouldn’t be able to left click it then steal it. I think. But I haven’t tested it. Thoughts anyone?
Jared,
The only thing is that I do select for my images to be displayed full size and no link. From my computer, I can not right or left click any of my images, but my friend can left click my images from her computer… doesn’t make sense! Maybe you (and anyoneelse for that matter) can go to my blog at http://www.jamieweiss.com/blog and see if you are able to do it.
Jamie
Jamie » so I checked it in firefox Mac and I couldn’t right-click or left-click, but I could drag it off onto my desktop.
but then i checked on Safari and i couldn’t do anything. i didn’t check anything on Windows, but clearly this has inconsistent results across browsers. i’ll keep digging for a better solution…
YAY!!!!!!!!!!!!!
I’ve been wondering how to do this forever!
Thanks Jared~You ROCK!
I was able to disabled the right-click, but in Firefox I can still drag the image off the page and onto my desktop. I’m doing this on a PC. On Internet Explorer I cannot right-click or drag the image off the page, however I can still hover over the image and save it from there.
Seth - Zelo Photography » yeah, this is not consistent across browsers, but it is better than nothing. I’m making a note to try to research something more secure and consistent cross-browser.
It’s not a big deal to me. Thanks Jared!
okay, I was able to do this until I upgraded to 2.5.1! Now if I just click on the image, it brings it up in a new screen and they can do what they want with it. The only image that it doesn’t do that to is the one that I uploaded before the upgrade!
Ganell » that’s odd. upgrading to 2.5.1 shouldn’t change anything about it. i’m definately going to look into a more consistent solution for this. maybe there is a plugin…
Instead of deletin the link on the pics, I linked them all back to my main web site. So they can’t left click and then right click.
Great !!!!!!!!!!!! Thanks a Lot
Works great! Thanks Jared.
Thanks Jared!
This is awesome. I did not realize this could be done on a blog. I was concerned at first that they could still left click and save, but once I disabled the link as someone suggested, that could not longer be done. Thanks Jared.
Hey Jared—thanks for the tip—I did this and it worked until I posted another post and now my code matches above but you can right click and save (pc/ie browser). Is there any reason why it would default back even though my code is the same as above (disabling code)?
@Teri: it seems to be working for me on Firefox/Mac. this tip is only partially reliable.
you could try adding this line:
<meta http-equiv=”imagetoolbar” content=”no”>
into your header.php file RIGHT BEFORE the </head> tag. that might help IE.
I followed the directions, but if you left click on the photo, it takes you to another screen with just the photo & then you can right-click the photo there. Am I missing something?
@Eliza: to disable left click, you need to link the image to something other than the image when you post. some people link to the blog or to the post.
I’m not sure I’m following. Do you have a tutorial/tips on that?
Finally figured it out! Thanks!!@!
I too get the little toolbox that allows the photo to be saved so the right-click option isn’t all it’s cracked up to be. I tried adding the option above but that hasn’t worked either. I guess I’ll have to watermark pretty well.