隐藏的img src值 [英] Hidden img src value

查看:178
本文介绍了隐藏的img src值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我不知道这是否可能,因为我通过搜索找不到任何东西,但我想确认。

So I'm not sure if this is even possible as I couldn't find anything by searching however I would like confirmation.

可以隐藏img标签的src值?例如:
< img src =image.jpg/> 会显示为< img src = > 或某种其他类型的方法。即使用户右键点击获取图像url,我不想检索它。这是可能吗?

Is it possible to to hide the src value of the img tag? For example: <img src="image.jpg" /> would appear as <img src="" /> or some other sort of method. Even if the user right clicks to get the image url, I don't want it being retrieved. Is this at all possible?

我没有访问head元素,也不能使用Javascript或PHP。我只能使用 Markdown 接受的有限HTML标记。

I don't have access to the head element, nor can I use Javascript or PHP. I can only use limited HTML tags that are accepted by Markdown.

推荐答案

不可能通过js / jquery或任何脚本语言隐藏它。虽然有调整等,你可以禁用右键单击或显示假图像 src 或使用CSS设置图像 background-image 属性(这样,用户将无法右键单击并将图像另存为)欺骗普通用户;

No its not possible to hide it through js/jquery or any scripting language. Though there are tweaks etc like you can disable right click or showing fake image src or setting image using CSS background-image property (this way, the user won't be able to right click and save the image as) to deceive a common user;

<body oncontextmenu="return false">
</body>

我理解,你的愿望是限制用户通过隐藏图像源来窃取你的图片。请记住,如果用户可以在其浏览器上看到图片,则表示用户已下载图片,并且已在其计算机上。简单就是这样。没有办法防止图片被盗。

What i understand, your wish is to restrict users from stealing your images by hiding the image source. Remember, if a user can see the image on their browser, then it means the user has downloaded the image and it is already on their computer. Simple is that. There is no way to prevent images from being stolen.

即使你设法以某种方式发明了一种图像在客户计算机上显示的方式,

Even if you managed to somehow invent a way for an image to be shown on the customers computer without them downloading it, then they can still take a screen shot, and again your plans have been failed.

有些帮助链接(像您这样的问题)

Some helping links for you (questions like yours)

1)保护图片下载
2)禁止直接下载网址的图片

这篇关于隐藏的img src值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆