JSFiddle - React, Tailwind, and code Playground
by MegaScience
HTML
<img id="a" src="https://via.placeholder.com/350x150">
JavaScript
setTimeout(function() {
$("#a").attr("src", "https://via.placeholder.com/200x100");
}, 1000);
$("#a").get(0).addEventListener('load', e => console.log(e.target.src))