You could use the box-sizing
properties to load second image in background
and show it on hover
:
HTML base:
<h1 id="logo">
<a href="http://stackoverflow.com">
<img src="http://lorempixel.com/100/100/abstract/2" alt="Stack Overflow">
</a>
</h1>
CSS base:
h1 a img {
background:url(http://lorempixel.com/100/100/people/9);/* preload img 2 here */
box-sizing:content-box;/* safe reset , use prefix */
}
h1 a:hover img {
height:0;
width:0;
padding:50px;
}