Results 1 to 6 of 6

Thread: Not allowing image save

  1. #1
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default Not allowing image save

    Hi,

    What's the easiest way for not allowing saving any image from my site?

    Thank you

  2. #2
    Join Date
    Jan 2009
    Location
    NH
    Posts
    674
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    There's always a way to get an image. You should add a watermark to the images so others can't use them.

  3. #3
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default

    and though what way can you avoid saving images?

  4. #4
    Join Date
    Jan 2009
    Location
    NH
    Posts
    674
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    put this inbetween the <HEAD> tags

    Code:
    <script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js'></script>
    <script type='text/javascript'>//<![CDATA[ 
    $(function(){
    $('img').bind('contextmenu', function(e){
    return false;
    }); 
    });//]]>  
    </script>

  5. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Keep in mind that @mlegg's first answer was more accurate. For example, if you use the script he mentions, I could circumvent it by (off the top of my head) disabling javascript, or I could simply use the [print screen] button on my keyboard. That is, assuming my browser even allows the context menu to be blocked in the first place (which it should not; websites have no business trying to take control of the browser away from the user).

    The short answer is: it is not possible. If someone can see the image, they have already downloaded it. The picture is on the user's computer, not on your server. That's just how HTTP works. If you are interested in a more involved discussion on the topic, see here.

  6. #6
    Join Date
    Jun 2013
    Location
    Westminster, MD
    Posts
    18
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Default

    Here are some simple script to disable the right click, they may work to stop the average Joe from getting it. But as stated there are many ways to get a pic from a website. Even some watermarks can simply be cropped out if they only appear in the corner of the pic.

    http://www.dynamicdrive.com/dynamicindex9/noright.htm

    http://www.dynamicdrive.com/dynamicindex9/noright2.htm

    http://www.dynamicdrive.com/dynamicindex9/noright3.htm

    Here's one to block copying text also:

    http://www.dynamicdrive.com/dynamicindex9/noselect.htm

Similar Threads

  1. Disabling image save with JS
    By jtrory in forum JavaScript
    Replies: 1
    Last Post: 07-12-2009, 03:41 AM
  2. IE6 not allowing ajax ddtabs
    By tripleGmax in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 01-25-2008, 07:59 PM
  3. how can i save image
    By jackavin in forum PHP
    Replies: 2
    Last Post: 10-08-2007, 06:32 PM
  4. Dno't save image
    By foxpro in forum Graphics
    Replies: 3
    Last Post: 09-06-2005, 02:32 PM
  5. How to save image to computer ?
    By jschris in forum JavaScript
    Replies: 1
    Last Post: 03-14-2005, 07:53 PM

Bookmarks

Posting Permissions

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