Reputation: 119
I want to load image into <img src"..."/>
and hide it's original source. Or - to cypher.
Is there any possible solutions?
UPDATE: I want to do it, because I do not want that user could find original source of image and get to it.
May be there could be the way to save it to temporary location, rename it with random letters and then use the image?
Upvotes: 0
Views: 295
Reputation: 2297
Now that the question is clarified, my best guess would be to download the image to your server and then use some kind of hotlink protection to prevent users from access it directly. See http://www.htaccesstools.com/hotlink-protection/ for more information. You might need another solution depending on your technology (server/programming language)
Upvotes: 2
Reputation: 3815
One thing you can try is to use a canvas element, then load your image into the canvas via javascript. Then get the datauri of the canvas and set that as the value of your img src.
Upvotes: 1
Reputation: 6310
No. Any img element results in an HTTP request for that image resource. This is easily trackable in most browsers.
Upvotes: 0