开发者

Is there a way to stop users from downloading an image from your website?

I'm using asp.net but open to using any language for doing this. I've seen some javascripts that does this but they seem 开发者_JS百科pretty easy to get around.

Is there a reliable way to keep users from downloading an image?


Don't put it on the website.

Seriously. If you send it to the user to have it displayed to them, then they have the image, and can thus save the image. Relying on the browser to enforce some sort of policy will inevitably end in defeat. If you can view it, you can copy it. The music industry has been learning this lesson the hard way.


Trying to prevent a file on a web site from being copied is like trying to prevent water from being wet.


Serve your images by creating a matrix of 1 pixel images in a table.

i.e. for a 1024x768 graphic:

<table>
  <tr>
    <td><img src="1_1.png" height="1" width="1"></td>
    ....
    <td><img src="1_1024.png" height="1" width="1"></td>
  </tr>
  .... repeat x768
  <tr>
    <td><img src="1_768.png" height="1" width="1"></td>
    ....
    </td><img src="1024_768.png" height="1" width="1"></td>
  </tr>
 </table>

Seriously, who is going to want to assemble 786432 pixels?

Have fun! :P


No, it's impossible. I have seen scripts/hacks that:

  • Hide images behind other images
  • Disable right clicks, and some keys on the keyboard (annoying)
  • Clean the clipboard (extremely annoying)
  • And more

But none of them will stop a reasonably knowledgeable user from downloading the images.


No. In the extreme, they could just take a photo of the screen with a digital camera and take the image that way. But even pressing PrnScrn is usually enough to get around the most advanced techniques.


No. They could use web developer toolbar and its image option to view all image paths thus they can download it..


The real question is: Why would you want that?

If you're allowing the user to see the image, you shouldn't care if they download it. Maybe the solution is to restrict access to that image, watermark it, or prevent hotlinking if you're ever worried about that.

There are methods to make it more difficult, but as many have pointed, no real way to prevent it.


Make the image a hideous primary green and magenta flashing animation, and nobody will want to copy it :-)


Can you somehow translate the "image" into a “movie”, whether an animated gif, flash or whatever?

Imagine it as divided into a checkerboard – and then you randomly display say 50% of the squares each displayed frame and hope that that is quick enough to fool the eye into seeing a solid picture ...

I wouldn't bet on it, but with enough computational power (at the client side) it seems like a solid idea.

Even if you publish your algorithm you should be ok if the end-user/potentail-hacker can't get at the random number seed.


You can use http://www.swfir.com/ or show images in SWf and call images in swf through XML.


Don't display your images if you don't want it to be copied. Hahaha,..


I am suprised that no suggested adding a watermark ... just some text with your name or URL on it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜