JSFiddle - React, Tailwind, and code Playground

HTML

<body id="cover-art">

</body>

JavaScript

$('<img/>').load("https://cdn2.hubspot.net/hubfs/233529/https-1.jpg", function(res, status, xhr) {
		console.log(status);
      if (status == "error") {
        alert("Image not loaded");
      } else {
			$(this).remove();
        $("#cover-art").css('background-image', 'url(https://cdn2.hubspot.net/hubfs/233529/https-1.jpg)');
      }
    });