Created
March 5, 2017 19:03
-
-
Save JMPerez/ffb70bbafb881581cf31f23e005b27a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure> | |
<div> | |
<div/> <!-- this div keeps the aspect ratio so the placeholder doesn't collapse --> | |
<img/> <!-- this is a tiny image with a resolution of e.g. ~27x17 and low quality --> | |
<canvas/> <!-- takes the above image and applies a blur filter --> | |
<img/> <!-- the large image to be displayed --> | |
<noscript/> <!-- fallback for no JS --> | |
</div> | |
</figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment