Skip to content

Instantly share code, notes, and snippets.

@firegoby
Last active December 23, 2015 05:09
Show Gist options
  • Save firegoby/6584781 to your computer and use it in GitHub Desktop.
Save firegoby/6584781 to your computer and use it in GitHub Desktop.
As a fallback for non-JS users simply place your best one-size-fits-all img tag inside a noscript tag inside the div. With JS switched off this behaves just like a normal img wrapped in a div
<div class="imager" data-src="/image/1/720/0/images/example.jpg" data-width="720">
<noscript>
<img src="/image/1/720/0/images/example.jpg" alt="my image"/>
</noscript>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment