CS-Photo Gallery – How to prevent image download?

AG
Posted By
Amy_Gaddis
Aug 12, 2004
Views
1273
Replies
38
Status
Closed
On images I have posted on a website through the "automate photo gallery" command in Photoshop…Is there a way to prevent the option of right clicking on an image and allowing the "save as" command on an image? I have seen it done before on other sites and was wondering how to do it. Thanks.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

CC
Chris_Cox
Aug 12, 2004
There is no foolproof way of preventing people from downloading your web images (because just displaying them is downloading them).

There are some tricks to make downloading more difficult – but you’d have to create custom WebPhotoGallery templates to make it work.
AG
Amy_Gaddis
Aug 13, 2004
Chris – Could you help me with the code that needs to be put into the custom web gallery template? I actually did some customizing on my current web template but am not sure how to make downloading more difficult.
Thanks!
L
LenHewitt
Aug 13, 2004
Amy,

Once an image from the web is displayed in a browser IT IS ALREADY STORED ON THE USER’S HDD. It is in the Browser cache, and can be opened directly from there.

Additionally, anyone can look at the source code, see the image name and connect directly to the image.

There are JavaScripts that will disable the right-click, but all anyone has to do is turn off JavaScript in their browser, and they can right-click to their heart’s content.

Finally, anyone can take a screen shot and then crop-out your image.

By disabling right-clicks, all you are doing is saying to every single one of your visitors ‘I think you are a thief!’

Bottom line is there is absolutely and positively NO WAY WHATSOEVER to prevent people from stealing your images from the web. If you don’t want them stealing, don’t put ’em up there!
JW
John_Waller
Aug 13, 2004
In short, if you don’t want an image to be saved by an end user, don’t upload it.


Regards

John Waller
FB
Fernando_Berga
Aug 13, 2004
You can make a visible watermark on every photo.A litle ugly but…
DM
dave_milbut
Aug 13, 2004
Could you help me with the code that needs to be put into the custom web gallery template?

amy, cut and past this between the <head> and </head> tags. just remember that as everyone here has said, this can be easily defeated, simply by a user turning off the option to use javascript in the browser.

<script language="JavaScript1.2" type="text/javascript"> <!– hide
//———————————————————- — if (window.Event) document.captureEvents(Event.MOUSEUP); //———————————————————- — function nocontextmenu(){
//alert ("No Context Menu!"); //uncomment this to display message event.cancelBubble = true;
event.returnValue = false;
return false;
}
//———————————————————- — function norightclick(e){
//alert ("No RightClick!"); //uncomment this to display message

// use the following sample line to get around the
// right click ban and enable it for specific elements… //if (window.event.srcElement.id=="selCategoryDesc") DisplayDesc()

if (window.Event){
if (e.which == 2 || e.which == 3);
return false;
}
else if (event.button == 2 || event.button == 3){
event.cancelBubble = true;
event.returnValue = false;
return false;
}
}
//———————————————————- — document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
//———————————————————- — // –>
</script>
AG
Amy_Gaddis
Aug 13, 2004
Great – – thanks for all the information!
DM
dave_milbut
Aug 13, 2004
in addition, you can temporarily turn off the no right click feature (useful when debugging) by commenting those last 2 lines:

document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;

should become:

//document.oncontextmenu = nocontextmenu;
//document.onmousedown = norightclick;
AZ
Adam Z Lein
Aug 13, 2004
Instead of turning off the right click capabilities which also disables the other functions of the right click menu, I’ve seen others place a transparent one pixel GIF in a layer over the regular images. Set it’s size to the same size as the image you want to display. This way, when a user right clicks on the image, they’re actually getting the transparent one pixel GIF on top of the image they’re seeing.

Personally, I don’t think it’s worth the trouble trying to protect your content on the web. The reason we have the web is for sharing content.

wrote in message
On images I have posted on a website through the "automate photo gallery" command in Photoshop…Is there a way to prevent the option of right clicking on an image and allowing the "save as" command on an image? I have seen it done before on other sites and was wondering how to do it. Thanks.
LM
Lynch_Mike
Aug 16, 2004
The concept is worth pursuing for selling photos over the web.

While you won’t keep the web pros away, you’ll slow down the average customer if you make some changes to your page. And the casual looker probably would be less interested in printing out a watermarked 400x300px web image, settling for a reasonably priced enlargement.

Dave’s script is a good start, but you also need to add this to your header

< META http-equiv="imagetoolbar" content="no" >

Next you need to call up your page using javascript and
set the menu-bars to NOT appear. The following script does that, when you invoke the script from the linking page using the extra HTML in your link. (see below the script.)

< script language="JavaScript" type="text/javascript"> function newWindow(newWidth,newHeight) {
popup = window.open("","newwin","width=" + newWidth + ",height=" + newHeight + " ,resizable=yes,location=no,toolbar=no,status=no,scrollbars=y es ")
}

popup = " " ;
function checkWin() {
if (popup.document != null){
popup.close();
}
}

——-and you need this in the HTML Body link ——————–

< a href="[myfilename]" onclick="newWindow(980,640)" Target="newwin">< img SRC="[mythumbnail.jpg]">< /a>

—————end of link: extra link HTML —————— You can set your own newwindow sizes in the line above.

Note:I had to leave a space between the < and the following text or the message editor would try to interpret it and it wouldn’t display properly.

That clear gif image on a higher layer trick doesn’t seem to work.

A different idea I thought woulk was to add "no-save" to the image properties, but I don’t remember how to do this

And you’ll need a lot of web space.
My jobs take about 300mb when they are compressed (~50) 400×300 .jpgs. (300-500 pics)

Maybe I should just take less photos.

I know this is not exactly Photoshop stuff but I hope you find it worthwhile.

What I really need is a shopping cart…

-Mike Lynch
RH
r_harvey
Aug 16, 2004
By disabling right-clicks, all you are doing is saying to every single one of your visitors ‘I think you are a thief!’

Current versions of Mozilla have an option to not allow scripts to hook right-clicks.

Here’s a method cookies.htm <http://ourworld.compuserve.com/homepages/cookies.htm> that sometimes works–for the cookies and milk picture, not the rabbit logo.
RH
r_harvey
Aug 16, 2004
D’oh!

Yeah, that’s pretty close to what I should have typed.
LM
Lynch_Mike
Aug 16, 2004
Dave,
(or: anybody)
Is this: -> document.oncontextmenu = nocontextmenu;
the same as this -> < META http-equiv="imagetoolbar" content="no">

Thanks.
-Mike Lynch
DM
dave_milbut
Aug 16, 2004
TABLE {color:white; border:#e0e0e0 inset 1px; background: url(cookies.jpg) center no-repeat; padding:10px;}

nice.

mike, oncontextmenu is an event that fires when the user right clicks to bring up the right click (context) menu. so your answer is no. different things. and that meta stmt only affects Internet Destroyer.
LM
Lynch_Mike
Aug 16, 2004
So then it is important to add the metatag to prevent the image toolbar in IE.

I found this "no-right-mouse-click javascript which worked in both IE(6) and NS(7) Either I misscopied up, or your script only works in IE.

< !– hide

function clickIE4() \
{
if (event.button==2)
{
return false;
}
}
function clickNS4(e)
{
if (document.layers||document.getElementById&&!document .all) {
if (e.which==2||e.which==3)
{
return false;
}
}
}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById) {
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false")

// –>
< /script>

I dont know how to insert this script without the message interpreter making the HTML code active, so I left a blank space after the "<" again. Is there an easier way to do it?

Thanks again.
-Mike Lynch
L
LenHewitt
Aug 16, 2004
Mike,

Is there an easier way to put script or code into this forum?<<

Yes. Either put a space after each opening ‘<‘ bracket or type ‘&lt;’ rather than ‘<‘

<script language="JavaScript1.2" type="text/javascript"> <<

The language attribute is deprecated markup. Current standards call for :

<script type="text/javascript">
JJ
Jerry_Jensen
Aug 16, 2004
right clicking on an image and allowing the "save as" command<<

Too much work, just go up to "file". "save as" and slurp up the entire page, html and all. No need to click on a specific image, get them all and sort later.

Just trying to point out that you CAN NOT prevent an image download if you want it viewed. If you can see it, you can capture it
DM
dave_milbut
Aug 16, 2004
If you can see it, you can capture it

more precisely, if you can see it, you’ve already captured it in cache on your machine.
JJ
Jerry_Jensen
Aug 16, 2004
Succinct, Dave, succinct

Always wanted to use that word!

Guess I should have said "you have it".
LM
Lynch_Mike
Aug 17, 2004
OK,
but why not output image slices…
I imagine I can invent a nifty action to output slices into HTML pages. At least, I can make potential theives work very hard… Len,
thanks for the clue about using &lt
JJ
Jerry_Jensen
Aug 17, 2004
With "file, save as" I suck the entire site. I can always put the images back together with no problem, other than a lot less time then it took you to slice them.

Even better, I can use a silly little utility called "screen shot" and send it all back to you in about a minute.

Again, if the viewer can view it, he can obtain the image.
RK
Rob_Keijzer
Aug 17, 2004
Some of the code presented in this thread causes the left margin to disappear (in the web based version anyway).

Rob
L
LenHewitt
Aug 17, 2004
Rob,

Unfortunately, editing the code as posted would break the script…
DM
dave_milbut
Aug 17, 2004
I think I can make potential theives work very hard.

Print Screen. <whew!> Miller time! 🙂
LM
Lynch_Mike
Aug 18, 2004
Print Screen. <whew!> Miller time! Oh well…
I don’t suppose I can disable the CTRL key from my web page, huh? -Mike
DM
dave_milbut
Aug 18, 2004
not sure. maybe with some kind of key cap, but that’s a modifier not an actual "key" don’t know if it can be done with document.onkeypress or the like. some experimentation is in order.

but the ranger’s not gonna like that yogi! 🙂

and again, it’ll be defeated if the user has scripting turned off.
LM
Lynch_Mike
Aug 19, 2004

[document.onkeypress]’ll be defeated if the user has scripting turned
off.

I think I could design the link to the protected pages so the protected pages are only accessible with script turned on,,,

On the other hand, I wouldn’t want to have people cursing me if they could not get the CTRL key back when they left my website. Maybe with an "onunload" script. I don’t know scripting that well.

And what about a script that reads a meaningless extension and translates it into .jpg while on the webpage. Yet it would store in the Temp dir with the meaningless extension and the theifr wouldn’t see the images because the browser wouldn’t recognise the filetype.
(another case of me not being smart enough to know it wouldn’t work.)

Oh well, I’ll keep dreaming. (Beats working)

-Mike
HP
Helen_Polson
Aug 19, 2004
not sure. maybe with some kind of key cap, but that’s a modifier not an actual "key" don’t know if it can be done with document.onkeypress or the like. some experimentation is in order.

A programmer friend of mine worked out a nifty way to stop print screen working. I’m not sure how he did it but instead of putting the screengrab on the clipboard it was a graphic saying "please don’t steal my images!". Unfortunately it wasn’t foolproof and caused some browsers to crash! I’ll have to ask him whether he’s managed to fix it yet 🙂

My boyfriend’s mum recently showed one of her friends some of my images on my website. The page she showed him is just a photoshop gallery, not linked to any of the pages on my "proper" website at all. I just sent the URL to some family and friends to show them some of my snapshots with my new camera. Word came back to me from this family friend via my boyfriend- did I know that my images could be stolen? That people could just take them off the internet? I laughed and said that all of the images on my proper website were a maximum of 250 pixels high so that they’d be practically useless for anything. Plus, the pages with the larger photos were for friends and family only, and if they wanted to save one of the larger ones they were more than welcome!
DM
dave_milbut
Aug 19, 2004
I think I could design the link to the protected pages so the protected pages are only accessible with script turned on,,,

you could but then you’re preventing the user from seeing the page at all. you could take your image off the web if you want to do that! 🙂

I thought the point was to protect the image as well as possible while still letting the image be viewed.

all you need to do to restrict viewing to users with javascript turned on is to place the link in a script function on the calling page then call that function instead of an <a> tag to open the image viewing page. of course at that point the user can go in to prefs, turn off scripting, reload the page and you’re back to square one.

bottom line is if people can see it, they can keep it. it’s already on their hard drive. you can restrict them all you want. they can still go into their cache and open the file directly from there. (where it might be named something like "dsaf49xx94523" instead of "mypic.jpg") a simple rename will fix it.

so far, the best way to protect a pic I’ve seen seems to be to display it with flash (SWF). Anyone know how to get around that? 🙂

"please don’t steal my images

defeated by the person with scripting turned off.
GH
Grass_Hopper
Aug 19, 2004
so far, the best way to protect a pic I’ve seen seems to be to display it with flash (SWF). Anyone know how to get around that?
can printscreen get around that?

If not, I might have to think about Flash!
X
Xalinai
Aug 19, 2004
wrote:

so far, the best way to protect a pic I’ve seen seems to be to display it with flash (SWF). Anyone know how to get around that? can printscreen get around that?

You can save the full flash file to disk.
You can save a screen capture to disk.

Michael
X
Xalinai
Aug 19, 2004
wrote:

I think I could design the link to the protected pages so the protected pages are only accessible with script turned on,,,

you could but then you’re preventing the user from seeing the page at all. you could take your image off the web if you want to do that! 🙂
I thought the point was to protect the image as well as possible while still letting the image be viewed.

all you need to do to restrict viewing to users with javascript turned on is to place the link in a script function on the calling page then call that function instead of an <a> tag to open the image viewing page. of course at that point the user can go in to prefs, turn off scripting, reload the page and you’re back to square one.
bottom line is if people can see it, they can keep it. it’s already on their hard drive. you can restrict them all you want. they can still go into their cache and open the file directly from there. (where it might be named something like "dsaf49xx94523" instead of "mypic.jpg") a simple rename will fix it.

so far, the best way to protect a pic I’ve seen seems to be to display it with flash (SWF). Anyone know how to get around that? 🙂

Have a look to the page source (if necessary through the browser cache). Then enter the address of the *.swf directly in the URL field. Then save the *.swf on your disk.

The remainder is only a matter of time.
Collectors will keep the full *.swf.

Michael
DM
dave_milbut
Aug 19, 2004
can printscreen get around that?

yes. 🙂
RH
r_harvey
Aug 19, 2004
So can anybody who wants to take apart the SWF.

Post good, usable pictures, and somebody will use them, even if it takes them all night to figure out how, and even if they have to clone-out your copyright watermark.

Just say YES to chunky, blobby JPG pictures.
DM
dave_milbut
Aug 19, 2004
or just say yes to public domain.
R
Ryadia
Aug 20, 2004
wrote:
On images I have posted on a website through the "automate photo gallery" command in Photoshop…Is there a way to prevent the option of right clicking on an image and allowing the "save as" command on an image? I have seen it done before on other sites and was wondering how to do it. Thanks.

How about putting a © copyright notice in extremely transparent layer so it has the image and the writing is just a fainter part of the image?

FWIW… Just putting your images on the Internet carries the premise that you want as many people as possible to see them. OK, so instead of trying to defeat downloads – something you will never do. Encourage them but your name will be on the image permenantly but faintly.

Like this pic I just did to prove the theory:
http://www.technoaussie.com/ryadia/3ofus.jpg

Hell, if you want publicity but don’t want people seeing your work, isn’t that a conflict?

Ryadia
A
artpictures
Aug 27, 2004
or with this script right hand click and hit enter, then the script will not work and you can save the photo

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections