JSFiddle - React, Tailwind, and code Playground
HTML
<div id="buttonWrapper">
<img src="http://dummyimage.com/100x100/f00/fff">
</div>
JavaScript
var img = document.getElementById("buttonWrapper").getElementsByTagName('img')[0];
img.onmouseover = function() {
this.src = "http://dummyimage.com/100x100/00f/fff";
}
img.onmouseout = function() {
this.src = "http://dummyimage.com/100x100/f00/fff";
}