How this site is disabling "Saving" pictures?

Discussion in 'Site & Server Administration' started by jahangir, Oct 2, 2010.

  1. #1
    Please open this link

    http://9gag.com/gag/38901/

    Now when you right click on the image (in Firefox) and select "View Image", you will see nothing. The image is not appearing and in the address bar it is showing this URL

    http://9gag.com/img/invisible.gif

    Even if you select "Right Click > Save Image As" you cannot save that picture but that invisible.gif file will be saved.

    How is this site protecting images?

    I want that script or whatever technique they are using.
     
    jahangir, Oct 2, 2010 IP
  2. zzbomb

    zzbomb Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Wow that is cool...

    Well there are a lot of things going on there. Although really its useless because i could easily prntscrn the page and have the image.

    1. Its breaking the image into 4 pieces and displaying them in a borderless table. Making it look like one.
    2. Than they are somehow wrapping the <img> into a div.


    <div class="img-wrap">
    <table cellspacing="0" cellpadding="0">
    <tbody><tr>
    <td><img alt="" src="http://d3uwin5q170wpc.cloudfront.net/photo/38901_580x2_0_0.jpg"></td>
    <td><img alt="" src="http://d3uwin5q170wpc.cloudfront.net/photo/38901_580x2_1_0.jpg"></td>
    </tr>
    <tr>
    <td><img alt="" src="http://d3uwin5q170wpc.cloudfront.net/photo/38901_580x2_0_1.jpg"></td>
    <td><img alt="" src="http://d3uwin5q170wpc.cloudfront.net/photo/38901_580x2_1_1.jpg"></td>
    </tr>
    </tbody></table>
    <img alt="Musical Chair" src="/img/invisible.gif" class="bigfatdick">
    </div>
    HTML:
    Its interesting that the <img>'s have no / at the end.
     
    zzbomb, Oct 2, 2010 IP
  3. wgcom

    wgcom Peon

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    they are placing invisible.gif over the original image, so when you ViewImage or RightClick->save you viewing and saving invisible.gif.
    and yes they divide original image to 4, so you can download 4 images separately and combine them on your machine to one image.
     
    wgcom, Oct 3, 2010 IP