Disabling right-click save on your blog images
Monday, March 31st, 2008One 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!


