Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Protecting images from getting downloaded or saved

    Hi

    I m creating an online image gallery.
    Is it possible to not allow the user to copy the image on the site (right click save as or any other ways).
    are there any ways to prevent this.

    thanks all for your feedbacks...

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    D0u$h!t3 k4?
    Posts
    512
    Thanks
    2
    Thanked 5 Times in 5 Posts
    There are many ways to do this, such as disabling the context menu, but they are only temporary ways. Anyone with enough knowledge can get past what may seem like great protection. From what I know, the best way to protect your content is to create it with Flash, assuming you still want to put it on the Web (if you don't, that's the safest choice). With normal HTML, CSS and JavaScript, there isn't enough security. This goes for PHP, ASP.NET and other server-side languages too since they all end up as HTML pretty much.
    PHP Code:
    $hello file_get_contents('hello.txt'); echo $hello
    hello

  • #3
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    not possible.
    If the user can see it, the user can save it. There have been many related topics on this forum (http://www.codingforums.com/showthread.php?t=4437) and they all end the same: You cant do it.
    The best way to protect your images is to add a copyright overlay or something similar. like this example from clipart.com:
    http://www.clipart.com/en/close-up?o...&k_exc=&pubid=
    flash is the same because you can still screen-shot or just save the flash file.


    -Adam


    Someone close this before it gets to be 6 pages and 82 posts...
    Why not thank me?

    http://adamsworld.name

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Before a browser can display the images on a web page it first downloads them to the cache on the local computer. By the time your visitor sees the images on your page they already have a copy of it on their computer and so preventing them from copying it again is pointless.

    Someone should close this before it gets to be 8 or more pages long - this subject has been done to death many times before - if you don't want people to be able to copy it then don't put it on the web.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,366
    Thanks
    11
    Thanked 590 Times in 571 Posts
    a simple way to stop right-clickers is to
    1. show the image as a background-image, not an "<img>"
    2. put a clear textbox over the image. textboxes get thier own special right-click menu, which doesn't include "save as..."

    the above posts are correct there there is no sure way of doing this.
    i don't know how you could stop "printscreen".
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • #6
    New Coder
    Join Date
    Nov 2007
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Right click is more annoying to web users.. and doesn't stop people who really want to take your images. My suggestion would be to watermark your images if your really scared of people reproducing it as their own.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •