Hidden value img src

Therefore, I am not sure that this is possible, because I could not find anything by doing a search, but I would like to confirm.

Is it possible to hide the src value of the img tag? For example: it <img src="image.jpg" />will look like <img src="" />or some other method. Even if the user right-clicks to get the URL of the image, I don’t want it to be restored. Is it possible?

I do not have access to the head element, and I can not use Javascript or PHP. I can only use HTML tags that are accepted by Markdown .

+3
source share
6 answers

js/jquery . .., , right click src CSS background-image ( , ), ;

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

, , . , , , , . . .

- , , .

(, )

1) 2) URL

+6

, , src JavaScript . , , - src , ...

  • Copy image URL, .
  • Save image as....

, , , , , . , , , , , , .

+4

( , dev ..), . , , , div. div. , css, , , , , ..

http://jsfiddle.net/9V3v2/2/

, ( ), , , .

<div>
    <img src="http://FAKE-PLACEHOLDER-IMAGE-HERE"/>
</div>
img{
    width: 100%;
    height: 100%;
    opacity: .01;  /* effectively transparent but still right-clickable */
}

div{
    width: 500px;
    height: 500px;
    background-image: url(http://REAL-IMAGE-HERE);
}

, , firebug chrome dev, .

+4

. , . . .

div {
  width:1900px;
  height:628px;
  background-image: url(http://www.trafficsource.co.uk/wp-content/uploads/2015/02/section4-bg.jpg);
}
<div></div>
Hide result

0
0

, . , javascript/jquery.

-1

All Articles