JSFiddle - React, Tailwind, and code Playground

HTML

<img id="imageElement" src="" height="500" width="500" />

JavaScript

fetch("https://random.imagecdn.app/500/500").then(async response => {
  const url = window.URL || window.webkitURL;
  const blobUrl = url.createObjectURL(await response.blob());
  document.getElementById("imageElement").setAttribute("src", blobUrl);
});