Protecting Your Images

    May 11, 2001

Many artists have written me asking about protecting their images. Although there are several software which allow people who want your images to download them from your site, most people just right-click on the image and left-click on the “Save As” option. In order to stop people from right-clicking on your image and then saving it to their hard drive, you can put in this JavaScript in your page:

[This will not work for surfers who are using Netscape version 3 and earlier and I.E. users 2.0 and earlier.]



<!– This script and many more are available free online at –>
<!– The JavaScript Source! –>

<!– Begin
function right(e) {
var msg = “Sorry, I can’t let you grab my picture.”;
if (navigator.appName == ‘Netscape’ && e.which == 3) {
return false;
if (navigator.appName ==
‘Microsoft Internet Explorer’ && event.button==2) {
return false;
else return true;

function trap() {
document.images[i].onmousedown = right;
// End –>


<body onLoad=”trap()”>

I taught I taw a puddy tat!<br>
I did! I did tee a puddy tat!<br>

<img src=”tweety.gif”>


Note: If you need the pic of tweety for the code, you can find one here:

I hope that this helps all the artists out there who want to protect their work online.

iEntry provides free highly informative newsletters for web developers, IT professionals and small business owners. We deliver 50 million email newsletters per month and have over 4,000,000 unique opt-in subscribers. From our extensive range of email newsletters we can provide you with a selection of newsletters that best meet your interests.