JSFiddle - React, Tailwind, and code Playground

HTML

<img id="imgSlider" width="284px" height="284px" src="try.jpg"/>

JavaScript

window.onload = initAll();


function initAll(){
document.getElementById("imgSlider").src = "menuBack.jpg";

}