SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    stop images save as from browser

    hi

    i want to stop my images from saving as from browser.

    like i have a webpage uploaded with images. i want that visitor should not able to select option "save webpage" and save my images with one click.

    he may save it by right click but they should not get save in one click.

    vineet

  2. #2
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do this with either html or css
    with html:
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td background="picture.jpg" width="125" height="250">
    <img src="pixClear.gif" alt="picture" border="0" width="125" height="250">
    </td>
    </tr>
    </table>
    with css:

    create a css file
    img {
    border:none;
    }

    #pictureBack{
    width:125px;
    height:250px;
    background-image:url("picture.jpg");
    background-repeat:no-repeat;
    border:2px outset #D8D8D8;
    background-color:#999999;
    }
    then connect the style sheet to the page and insert the following code for the picture

    <img src="pixClear.gif" alt="picture" width="125" height="250" id="pictureBack">
    hope this helps
    Web Hosting Reviews- BestWebHostingReview.org

    Cheers

  3. #3
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks Dave

    for the reply. but i think firefox has plugin that can save background images in one click.

    do you any solution through .htaccess file but not hotlinking

    vineet

  4. #4
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry vinpkl

    I am not aware of any .htaccess methods, just those two and I know there is also a javascript method but it's the same basic principle.
    Web Hosting Reviews- BestWebHostingReview.org

    Cheers

  5. #5
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    anyway thanks dave

    i will look for the solution.

    the website in your signature doesnt opens. is it yours.

    vineet

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    In order to display the images in the web page the browser must first download them to the local computer. By the time someone sees the images in the web page they have already got a copy on their computer under their control and nothing you can do can prevent their moving the images to a different location so as that they do not get overwritten.

    The only way to prevent people from downloading the images on your site when they view a web page is to delete all the <img> tags from the HTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the heads up vineet

    its working now, yes it is mine
    Web Hosting Reviews- BestWebHostingReview.org

    Cheers

  8. #8
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    As Stephen said, if someone is viewing your image they technically *HAVE* your image. All you can do is make it more tiresome to get. Your options are:

    1) Watermarking: Doesn't stop them but at least gives you credit or forces them to spend time Photoshopping the watermark out, which takes some time and effort.

    2) Disable rightclick/obscure with CSS: These methods are pretty much the online equivalent of leaving a key under the doormat. The door may be locked, but anyone who has 2 minutes to poke around will get in effortlessly.

    3) Embed Image in Flash/Java: Slightly more effective as fewer people know how to deconstruct a SWF file. Nevertheless, a simple screen capture and cleanup in a graphic app is an option for almost anyone with rudimentary computer know-how.

    The question is whether it's a worthwhile use of your time and resources to try to lock down your images. If your images are valuable enough, people will always be sufficiently motivated to rip them anyway, but you'll probably be doing enough to remove yourself from Google Images, and other potentially good sources of traffic. You can't make your content harder to rip without making it harder to find.

    Is that a worthwhile result?
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable

  9. #9
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexW View Post
    These methods are pretty much the online equivalent of leaving a key under the doormat. The door may be locked, but anyone who has 2 minutes to poke around will get in effortlessly.
    As you and Stephen noted, if someone has a modicum of computer savvy, they can get your images no matter what you do. The methods you give will work for the average Joe, who, if right-clicking doesn't give them the means to copy, will go do something else and leave your images alone. That's about all you can do.

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    A lot of newbies have the menu bars in their browser turned off and rely on right clicking to bring up the menu to be able to navigate between pages. If you interfere with that they end up having to close and reopen their browser just to be able to leave your page.

    Those serious about wanting to take images will do so in a way where they are not even aware of whether you have tried to "protect" the images.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  11. #11
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep. To put it plainly, don't do it!
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn



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
  •