<img id='source' onmouseover="setNewImage('source')" class="pic">
.pic {
  border: solid;
  height: 100px;
  width: 100px;
}
function setNewImage(p) {
  document.getElementById(p).src =
    "https://images.unsplash.com/photo-1652752761132-73b207ab32fc?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMxMzcwMDE&ixlib=rb-1.2.1&q=80";
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.