Forum Moderators: open
I don't think that you can do this with JavaScript. As JavaScript is a client side language, the image would need to be part of the document object model (DOM) before you could use JavaScript to do anything with it.
I have put the image path into a string, is there anyway to add it to the DOM without actually rendering it?