JSFiddle - React, Tailwind, and code Playground

HTML

<img id="bg" src="http://www.istockphoto.com/file_thumbview_approve/9958532/2/istockphoto_9958532-sun-and-clouds.jpg">
     <div onmouseover="imgChange('http://www.istockphoto.com/file_thumbview_approve/4629609/2/istockphoto_4629609-green-field.jpg'); "onmouseout="imgChange('http://www.istockphoto.com/file_thumbview_approve/9958532/2/istockphoto_9958532-sun-and-clouds.jpg');">hover me</div>

CSS

div{
    background-color:yellow;
    width:50px;
    height:50px;
    position:fixed;
    top:300px;
}

JavaScript

function imgChange(im){
    document.getElementById('bg').src=(im);
    }