JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id="testDivID">
<img />
</div>
</body>
JavaScript
var image_url = "https://www.google.co.nz/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" ;
$('<img src="'+ image_url +'">').load(function() {
alert("image found")
$(this).appendTo('#testDivID');
}).fail(function() {
alert("image not found")
});;