First of all there is a question with the same title here on SO but its not what I\'m looking for and it doesn\'t have a complete answer either.
So here\'s my questi
Krof Drakula is right, you cannot load an image from a different domain, but do you really need to do this? You can create and append an img
tag and wait for it to load (with something like jQuery load()
).
var img = document.createElement( 'img' );
img.setAttribute( 'src', url );
document.getElementsByTagName('body')[0].appendChild( img );