how to add image to document javascript code example
Example 1: javascript appendchild image node
let img = document.createElement("img");
img.src = source.getAttribute('data-image');
document.getElementByID("target").appendChild(img);
Example 2: inject image javascript
button.innerHTML = "<img src="image/image.png">"