Can you explain more clearly what you are trying to achieve here?
In the code you have posted, the image is a background image, which is being applied using CSS. CSS is the correct way to add a background image.
I don’t understand what you mean by “placing an image inside the javascript”. Please explain what you are trying to do, and why you feel you need to move the image.
An image in the HTML and a background-image in the CSS are not the same thing.
I ask you again; what are you trying to do, and why do you feel you need to move the image? What effect are you trying to create which is not possible with your current code structure?