1 let img = document.querySelector('img');
2 let start = img.src;
3 let hover = img.getAttribute('data-hover'); //specified in img tag
4
5 img.onmouseover = () => { img.src = hover; }
6 img.onmouseout = () => { img.src = start; } //to revert back to start