HOME       >>       Websites and Web Designing

How To Post Pictures On A Website That Cannot Be Copied


anwiii

the title pretty much explains my question. this isn't a tutorial on how to do it. i actually want to know HOW to do it. i have some interesting pictures. i know if i post them on my site, they are going to be copied so i want a way to post them without any way that someone can copy them. how does one do this?i want a secure way of protecting the pictures so please don't tell me to disable the right click button as any fool can bypass that.


rvalkass

There are two ways to look at this:

 

1. It's Impossible

 

Anything you place on the web, by definition, has to be downloaded to the user's PC before they can see it. They have therefore already been copied on to the user's computer, and from there they can do whatever they like with them.

 

2. You're Already Covered

 

Copyright law in most countries around the world already protects you. In most countries your work is under your copyright from the moment of it's creation, which means that people can't copy it in many ways (except under fair use). To enforce this you would need proof the work is originally yours, the date of its creation, the identity of the person copying it, and proof that what they're doing isn't covered by fair use.

 

If you are that desperate to stop people copying your work, consider whether you should actually be releasing it at all (in any form).


Rigaudon

There are two ways to look at this:

 

1. It's Impossible

 

Anything you place on the web, by definition, has to be downloaded to the user's PC before they can see it. They have therefore already been copied on to the user's computer, and from there they can do whatever they like with them.

 

2. You're Already Covered

 

Copyright law in most countries around the world already protects you. In most countries your work is under your copyright from the moment of it's creation, which means that people can't copy it in many ways (except under fair use). To enforce this you would need proof the work is originally yours, the date of its creation, the identity of the person copying it, and proof that what they're doing isn't covered by fair use.

 

If you are that desperate to stop people copying your work, consider whether you should actually be releasing it at all (in any form).

It's true that you must download a picture before you can view it, but most people don't know how to find it. To prevent them from copying the picture by right-clicking, you just need a simple script, and I think you'll find that it will stop the majority of people who visit your website from stealing it, as most people who browse the internet today aren't geeks (~60% still use IE... *barfs).

 

Anyways, do this:

<body oncontextmenu="return false;">

 

This will disable right click for your entire page.

 

Good luck on... not getting your pictures stolen O_o


truefusion

I wouldn't call it entirely impossible, since i've seen a website prevent images from being saved onto the computer (i.e. "Save Image As"). I am not exactly sure how they did it, but whenever i tried to save the image to my computer, i would end up downloading an HTML page instead. I'm sure you can tell the browser not to cache the image too. The website, however, i do not remember, but copying and pasting the image into an image editor would have been the obvious way around it. But if you're going to embed the image in an HTML page, use JavaScript to load the image and prevent right-clicking on image elements. That way, if they disable JavaScript, the image won't be shown.Perhaps you can use an .htaccess file to prevent access to a directory where the image is in (most likely the directory would be called "images"), so whenever someone tries to access the file directly they would be denied. Loading the image, then, in an HTML page may be tricky and may require some server-side scripting.


Rigaudon

Well, in any case, if the user can SEE the image, regardless of whether they can access it or not, they can always take a screenshot of it and crop it out.


web_designer

you can use this code for java script, that disable right click on your page but allows copying text by CTRL+C. so if you don't want to avoid everything from being copied. use this code and add that your visitor can copy text by using ctrl+c in the alert message (var message="Function Disabled!" , or you can change it to whatever you want. you can put it after BODY tag in your page

<script language=JavaScript><!--//Disable right mouse click Script//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive//For full source code, visit dynamicdrive.com/var/ message="Function Disabled!";///////////////////////////////////function clickIE4(){if (event.button==2){alert(message);return false;}}function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);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("alert(message);return false")// --> </script>
also, you can always add a water mark to your images by any graphic program, or set a transperancy by CSS, for example you can make your image looks by default transparent, but when pass the mouse over it it will show without transparency, i did that to my social bookmarks in my website, you can take a look on them, and i will show you how. or you can check this link, i found it by accident when i was searching the net http://forums.xisto.com/no_longer_exists/ good luck.

Rigaudon

Hahaha, I love how we're all posting codes on how to disable right click when he clearly said that he didn't want that in his post. As for me, that's what I get for staying up all night soft resetting Pokemon Emerald trying to get a shiny Treecko. Well, as I can't find any edit button, let's just say I posted it to annoy anwii .


kleong

Yep, as mentioned, there is practically no way you have prevent others from taking it. You can disable the right click function and such. But what one could be is to take a screen capture, with the help of photoshop, they will still be able to get the image. One possible deterring way would be to put your website as a watermark. In that case, even thou they are able to grab it, at least, they wont be able to grab a perfect version.


anwiii

correctamundo! haha just to annoy me huh? i saw that message in the shoutbox haha

but yea, any monkey can get past the right click disable. i was thinking more of flash or something? some other format that would protect the pictures. or maybe a combination of things i can do so it's not so easy. of course right click would enter in to that formula but i don't trust it alone....

the pictures are images i took from a graveyard one day when i visited with two other people. they aren't edited and some of the best captures i ever took. that's why i need them protected. also, yes, i want to post them and it's worth the risk of them being stolen.

Hahaha, I love how we're all posting codes on how to disable right click when he clearly said that he didn't want that in his post.
As for me, that's what I get for staying up all night soft resetting Pokemon Emerald trying to get a shiny Treecko.

Well, as I can't find any edit button, let's just say I posted it to annoy anwii .



rvalkass

the pictures are images i took from a graveyard one day when i visited with two other people. they aren't edited and some of the best captures i ever took. that's why i need them protected. also, yes, i want to post them and it's worth the risk of them being stolen.

Some form of watermarking is probably your best bet then. Put your name/URL/whatever somewhere centrally in the image. Do it fairly small and in a way that 'blends in' with the background (ie. not 72px bold red text). This doesn't directly stop people copying, but it makes it obvious if they do - and you still get credit. Unfortunately you'd have to place the watermark in the centre to avoid people cropping the images to cut off your watermark.

If you're intending to use the images for commercial purposes (ie. selling the rights to them or selling prints of them) then you can just put low-quality versions online (either very compressed JPEGs, or just small sizes) so that they are useless for commercial purposes, but people still get an idea of the image and whether they want to pay.

It also depends on how far you want to go i protecting the images, and who you're trying to deter. If you set the images as the background for a DIV element using CSS, you can't copy the image with right clicking in most browsers. You can go further by placing a DIV over the image of exactly the same size, with its background set to a repeated 1px square that is a transparent PNG or GIF. The image is still viewable in the browser, and right clicking and selecting "View Background Image" just presents the user with a 1px transparent square rather than your image. Of course, looking through the CSS reveals the actual path to the image. And nothing can stop people pushing the "Print Screen" button on their keyboard

mahesh2k

If you're intending to use the images for commercial purposes (ie. selling the rights to them or selling prints of them) then you can just put low-quality versions online (either very compressed JPEGs, or just small sizes)

Some stock image sites use watermark(getty images) on displayed images and only person with buying rights can get image without watermark. Not sure how this is done at the same time while making purchase. I'm also curious about profile images rendered on social networks like orkut. You can't right click and save them even if they allow context menu for you to do. You'll end up saving blank image of one dot. I don't know which trick they used. Flash images can also be extracted as there are softwares that lets you do that. Music, images and content can be extracted from flash files. Those who are interested in doing that will know where to find it. But using flash will definitely help files protect from typical noob plagiarists or from people who use files/pics of others without giving credit.

A year before i came across website that restricts people from copying website from HTTtracker, restricted context menu and used JS for images and restricted on most typical ways to copy the site and the stuff inside it. Not sure how they did that.

web_designer

hi, anwiii. take a look on these links.

http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/

these links contain ajax scripts for images viewer. and not allowed save as image option, hope it will work for you.


Soviet Rathe

k, there is absolutely no way to keep someone from copying any part of a website, but you can make it harder you can use CSS or PHP to show the picture but not be able to simply right-click and save it, I'm not sure how to do this but for the normal user they would not be able to simply save the picture, but with someone who it a bit more advanced they can grab it from their cache.


shadowx

ou can use this code for java script, that disable right click on your page but allows copying text by CTRL+C. so if you don't want to avoid everything from being copied. use this code and add that your visitor can copy text by using ctrl+c in the alert message (var message="Function Disabled!", or you can change it to whatever you want. you can put it after BODY tag in your page

That code doesnt work, it listens for a mouse event that equals "2" which is indeed right click, however, left click is "1" so pressing both buttons at once = "3" and since 3 != 2 the script ignores it and i get right click.


You just cant protect these images other than watermarking. Screen shots will always get them. The only way to block that is to detect the print screen keypress and instantly change the picture to the most horrific thing you can find on google for a split second so they get some horrible image, but the likelihood of this working is about 1% assuming it is even possible.

Rigaudon

I've got it!

1) Use a java applet to get the picture. They won't be able to see where the picture is and can only get the class, which shows no source code. Here's a simple java app script:

import java.applet.*; import java.awt.*; public class appletImage extends Applet{ Image img; MediaTracker tr; public void paint(Graphics g) { tr = new MediaTracker(this); img = getImage(getCodeBase(), "freelinuxcds.gif"); tr.addImage(img,0); g.drawImage(img, 0, 0, this); } }
Change the image src in the code as necessary.
To put this on your site, copy the code, compile it, and store the class in the same folder. Add this where you want the image:
<applet code="appletImage.class" height="500" width="500">

2) Make it impossible to take a screenshot of it by overriding the clipboard when they press any key- Unfortunately, it only works for IE, but it's something.

document.onkeydown=copy;function copy() {var text2copy = "NO"; if (window.clipboardData) { window.clipboardData.setData("Text",text2copy); } else { var flashcopier = 'flashcopier'; if(!document.getElementById(flashcopier)) { var divholder = document.createElement('div'); divholder.id = flashcopier; document.body.appendChild(divholder); } document.getElementById(flashcopier).innerHTML = ''; var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'; document.getElementById(flashcopier).innerHTML = divinfo; }}

3) Just for extra safety, disable right-click.

This should cover about 99% of normal internet users. Hope this helps!

rvalkass

1) Use a java applet to get the picture. They won't be able to see where the picture is and can only get the class, which shows no source code.

What about users who don't have Java installed, or block Java applets in web pages? Java is also, in my experience, one of the slowest things you cna add to a web page, and a cause of many hours of personal frustration and anger and the browser continually freezing.

2) Make it impossible to take a screenshot of it by overriding the clipboard when they press any key- Unfortunately, it only works for IE, but it's something.

No. No. No. Breaking the user experience in that way is a horrific thing to do to your users. Plus, it wouldn't work if the screenshot was taken by an external application. Plus, as you say that would only affect users of IE, who have a hard enough time as it is They certainly don't need to find out that people are messing around with their clipboard without their knowledge.

web_designer

i got another good option, a customizable photo gallery in flash and it is free it called dfgallery, here is the link

http://forums.xisto.com/no_longer_exists/

this gallery not allowed "save as image " option, i test it myself, but ofcourse they can always take a screen shoot but you can avoid that by adding a watermark over each image.


mandla

One an image is on your pc screen from the internet, then a copy of it will be in the temp internet files folder. So i think based on my level of knowledge the only way to put the image on line is to call it using flash. there is a way of calling an image in Javascript I think and display the image as flash. You can call the image as a flash slide show and just make it rotate the same picture twice to the ordinary viewer they wont see transitions cause the start and end product are the same but I think when they right click to save as even if they have the Enable right click script, they will only get that flash right click menu which says loop, rewind, pause etc other than that they sort of dont have access to the files themselves as they are downloaded as flash files and even if they were to view source the source file will not show the script that calles individual files but just a script that simingly opens a swf file. Hope this works for you


dirty_keso

anwii, as it was previously stated" by you seeing the image it has already been downloaded" hence there is no bullet proof form of keeping an image safe from the public. however, you can use other features to help prevent the exploitation of your work by random visitors to your website. one way is by disabling the right click feature as recommended by web_designer. another form of disabling this feature is by putting the images in a swf format. in order to do this easily you can download picasa then zenflash gallery template. all you have to do is add the template to the directory ( should look something like this: c:\program files\picasa2\website\template) then open up picasa, highlight the images you want and go to folder>export as html and follow the guide that will come after that you should choose zenflash when the webtemplate design come out. after you have created the html file you can integrate it into your webpage. this will give you a create design and protect your work from others.


Ash-Bash

Well this can be done by a script to stop a right click though a simple 'Print screen' button will get round this then you simply 'crop'.What I do to stop others using images of my graphics cards and PC's is add a faint copy right diagonally across the image. There is no way they will be able to get rid of this even if they try the image will look different and horrible.



Pages :-

Page 1Page 2


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.