JSFiddle - React, Tailwind, and code Playground

HTML

<img id="foo" alt="" src="http://dummyimage.com/100x100/000/fff.png&text=bar" />

JavaScript

function updateImage(url){     
        document.getElementById("foo").src = url;
    }    
    window.onload = updateImage("http://dummyimage.com/100x100/000/fff.png&text=qux");