-3

Possible Duplicates:
prevent saving image from my site
Transparent <div> to prevent right-click, Save As

Hi guys is there any way to disable image "save","copy","save as" option by right click user mouse.Because i don't want any one to save my images.There are some scripts are available but they are not valid for all browsers.Any help which should be valid for all type browsers.

Community
  • 1
  • 1
AZHAR
  • 7
  • 1
  • 8
  • 6
    Just don't do it. Users can save the images anyway and it's very annoying when you want a contextual menu and you can't have one (from a user's perspective). – Gabriel Negut Jun 03 '11 at 12:20
  • If you disable right click for user he can also make a screenshot and get your images. There is no 100% safety for that. – Sarah West Jun 03 '11 at 12:20
  • This has been covered so many times before.. check [this StackOverflow search](http://stackoverflow.com/search?q=prevent+right+click+save+as) and see if there are some results that suit your needs. – slugster Jun 03 '11 at 12:21
  • Sir, please learn to internet – Jean-Philippe Leclerc Jun 03 '11 at 12:45

4 Answers4

6

It's pointless to try to do this. If the browser can display the image then the user can also download it. You may be best off putting a watermark on the images.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
0

Use

oncontextmenu="return false;"

Will disable the context menu when right clicked on image.

But wont stop the user downloading the image by direclty typing the url or taking a screen shot.

Jishnu A P
  • 14,202
  • 8
  • 40
  • 50
0

You could always put a div over the image element, that way the right click will be invoked against the div instead of the image and therefore no "Save As".

<div class="image">
<div class="covering"></div>
<img src="..." />
</div>

<style>
.image
{
position:relative;
}

.covering
{
position:absolute;
width:100%;
height:100%;
z-index:2;
}

Vinnyq12
  • 1,519
  • 9
  • 9
0

theres no way for doing it.. but using an empty gif (transparent method) you can prevent newbies from saving the real images

Vamsi Krishna B
  • 11,377
  • 15
  • 68
  • 94