Obfuscate Img Src in HTML
I need a way my image sources to be hard to read.
Currently I have
<img id="testImg" src="http://images.mydomain.com/sample.png />
a开发者_如何学Cnd I need it converted to something like:
<img id="testImg" src="javascript:xorDecode('3233435jh45h3232kl232kl2323', '32434mfr')"/>
Is this possible?
P.S. And I want to to so for around 200 KB various images.
If your xorDecode
function returns a valid URI, this will work. However, anyone with firebug will be able to see the decoded URI.
You can use the data URI scheme in new browsers, this will require you to encode the image as text and embed it in the page/css.
There is a plugin, in The Gimp, to export an image as a series of HTML <td>
's, one for each pixel. It is the best way to utterly obfuscate an image.
精彩评论