<p>Note: works for static images and animated gifs</p>


<img src="https://i.imgflip.com/efcqy.jpg" alt="Picture of a smiling dog" />



<img src="http://www.dailyhaha.com/_gifs/smiling-dog.gif" alt="Picture of an animated smiling dog" />
img {
  height: 150px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.