JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function show_image(src, width, height, alt) {
var img = document.createElement("img");
img.src = src;
img.width = width;
img.height = height;
img.alt = alt;
// This next line will just add it to the <body> tag
document.body.appendChild(img);
}
</script>
<button onclick="show_image('https://i.imgur.com/YmmSEz9.png', 300, 250, 'Big Red Kangaroo');">Display image</button>