有没有办法阻止用户从您的网站下载图像?
我正在使用 asp.net,但愿意使用任何语言来执行此操作。我见过一些 javascript 可以做到这一点,但它们似乎很容易解决。
有没有可靠的方法来阻止用户下载图像?
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 pretty easy to get around.
Is there a reliable way to keep users from downloading an image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
不要把它放在网站上。
严重地。如果您将其发送给用户以将其显示给他们,那么他们就拥有该图像,从而可以保存该图像。依靠浏览器来执行某种策略将不可避免地以失败告终。如果您可以查看它,则可以复制它。音乐产业已经从惨痛的教训中吸取了教训。
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.
通过在表格中创建 1 像素图像的矩阵来提供图像。
即对于 1024x768 图形:
说真的,谁会想要组装 786432 个像素?
玩得开心! :P
Serve your images by creating a matrix of 1 pixel images in a table.
i.e. for a 1024x768 graphic:
Seriously, who is going to want to assemble 786432 pixels?
Have fun! :P
不,这是不可能的。我见过这样的脚本/黑客:
但它们都不会阻止知识渊博的用户下载图像。
No, it's impossible. I have seen scripts/hacks that:
But none of them will stop a reasonably knowledgeable user from downloading the images.
不。在极端情况下,他们可以用数码相机拍摄屏幕照片并以这种方式拍摄图像。但即使按下 PrnScrn 通常也足以绕过最先进的技术。
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 itsimage
option toview 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 :-)
你能以某种方式将“图像”翻译成“电影”吗?无论是 GIF 动画、Flash 还是其他什么?
想象它被分成一个棋盘——然后你随机显示每个显示帧的 50% 的方块,并希望这足够快,足以欺骗眼睛看到一个坚实的图片......
我不会打赌,但是拥有足够的计算能力(在客户端),这似乎是一个可靠的想法。
即使您发布了算法,如果最终用户/潜在黑客无法获得随机数种子,您也应该没问题。
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.
您可以使用 http://www.swfir.com/ 或在 SWf 中显示图像并在 swf 中调用图像通过 XML。
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