I am trying to find out code or way of making sure noone can right click and save images on the website..there must be a way..I am working on Dreamweaver - so I am not very code literate...any suggestions??

I am trying to find out code or way of making sure noone can right click and save images on the website..there must be a way..I am working on Dreamweaver - so I am not very code literate...any suggestions??

Are you trying to protect the images from your web site? It's impossible. Whatever trick you try to pull, as long as I can see it, I can take a screenshot of the entire window, crop it in a graphics program, and then I have it.

If you're trying to avoid hotlinking (so others don't use the images off your server and drain your bandwidth), then configure your web server to do so. Just tell us the server you use.

If you want to give the user a hard time saving the images by right clicking and saving, use the methods from this URL. Keep in mind though that experienced web designers/developers/power users, know how to get around these. They also know about the screen capture method:

http://www.htmlite.com/faq010.php

Other ways include having a Flash file that displays the image or using some sort of server script to display the image. The server script could point to the image, and in your <img> tag, you would have the path to the server script page, not the image's path. So it would look something like this:

<img src="someimage.php?id=323">

That way, a person wouldn't know the path to the image to hotlink. Also, try avoiding the JavaScript "No Right Click" option. It doesn't look professional and could annoy others if they're trying to use other options when they right click, like copy and saving a piece of text.

Yep thats all true. There is no way of preventing someone from grabbing images from any website - just ways to make it more difficult for them. If you're trying to display copyrighted images, your best bet is to display small low resolution copies so that someone won't be able to enlarge them and print them off.

Are you trying to protect the images from your web site? It's impossible. Whatever trick you try to pull, as long as I can see it, I can take a screenshot of the entire window, crop it in a graphics program, and then I have it.

If you're trying to avoid hotlinking (so others don't use the images off your server and drain your bandwidth), then configure your web server to do so. Just tell us the server you use.

If you want to give the user a hard time saving the images by right clicking and saving, use the methods from this URL. Keep in mind though that experienced web designers/developers/power users, know how to get around these. They also know about the screen capture method:

http://www.htmlite.com/faq010.php

Other ways include having a Flash file that displays the image or using some sort of server script to display the image. The server script could point to the image, and in your <img> tag, you would have the path to the server script page, not the image's path. So it would look something like this:

<img src="someimage.php?id=323">

That way, a person wouldn't know the path to the image to hotlink. Also, try avoiding the JavaScript "No Right Click" option. It doesn't look professional and could annoy others if they're trying to use other options when they right click, like copy and saving a piece of text.

Thanks for the help - I will certainly check out the scripts - I don't feel confident about flash - haven't looked at and I don't think I would know where to start...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.