Created
June 28, 2020 08:35
-
-
Save jimmyadaro/0cd2aebf5f0768d021263fcf4d628eee to your computer and use it in GitHub Desktop.
Image with retina.js fallback "onerror"
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
<!-- This will include a "data-rjs" attribute on the PNG (or JPG) error fallback in case the SVG failed to load --> | |
<!-- See: https://github.com/strues/retinajs --> | |
<img src="/path/to/some.svg" onerror="this.src='/path/to/some.png'; this.data-rjs='2'; this.onerror=null;"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment