right click protect images

Hello Everyone:
What is the easiest way to prohibit right click menu options for the images on our site.  Basically, we have used the following code for the the thumbnail images; however, how do we protect the larger image linked to the thumbnail? Thank you very much.

<SCRIPT LANGUAGE="JavaScript1.1">

<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
return true;

if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
//  End -->
Who is Participating?
knonieConnect With a Mentor Commented:
Easiest way is to open your images in a custom-size pop-up window.
Most of the normal internet users can't figure out the image name in Pop-up widow JavaScript.

Then apply no-right-click script, and turn off menu-bar, toolbar of that pop-up window, then it would help, because many users don't know how to view page source of a pop-up window.

Another optional addition to this, is applying a Window-close script/function on right click, so if someone tries to right-click on that pop-up, it will close. So next time he would just view your images and won't try to right-click on them...

You cannot make it 100% safe, but at least it will prevent many...

In fact, you can never make anything on a webpage 100% copy free, but can try it for general audience.

Frosty555Connect With a Mentor Commented:
The idea behind this kind of protection is to prevent the user from easily figuring out what the URL of the image is. Once they know the URL, there's nothing you can do to stop them. That said, it's not possible to do that. Any savvy user can look at the page source, or examine the page in Firebug, identify the image on the server, and then download it directly. Disabling right click won't stop those who know what they're doing, and will annoy everyone else.

That said, the way you prevent your larger images from being downloaded, is you do not ever link *directly* to an image from a thumbnail. Have your thumbnails to a separate "large version" page which displays the large image, and also protects from right clicks just like what you've already done.

The only bulletproof way I can see of doing this is to have some kind of server side code deliver the images on a per-request basis, each page generating a "ticket" which gives it one time access to the images. You never link to a real image, instead you link to the server script that delivers the image. We can explore that option if you tell me what kind of server side languages you have available. PHP? ASP?
David BruggeConnect With a Mentor Commented:
Another fun way is with CSS. Save a tiny transparent TIFF or PNG and stretch it across a DIV that sits above your image. Then let them right click and download the transparent TIFF to their hearts content.
For added fun, make a nearly transparent message such as "Stop Stealing Images" that will not be visable over the image, but will show up when downloaded and viewed against a white background".
Frosty makes a very good point about not being able to protect your image. The subject was nearly run into the ground here http://www.experts-exchange.com/Web_Development/Images/Q_21912288.html
gone_ridingAuthor Commented:
Thank you for all of the responses and I apologize for not responding myself sooner.  I am interested in the custom-size pop-up window and stopping the right click behavior by applying a no-right-click script, and turning off menu-bars/toolbars of that pop-up window - would you happen to having any coding available for this?  Also, does anyone have any feedback on protware or web album generator?  
Thanks again.
knonieConnect With a Mentor Commented:
To create pop-up window with custom size and properties, use this link:

To prevent right-click, use the script:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.