const myImage = new Image(100, 200);
myImage.src = "picture.jpg";
document.body.appendChild(myImage);HTMLImageElement: Image() constructor / notebook
HTMLImageElement: Image() constructor
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<img width="100" height="200" src="picture.jpg" />