Last active
March 16, 2018 17:02
-
-
Save tttimur/73c54828cf71136dc553d84a13c3791d to your computer and use it in GitHub Desktop.
This file contains 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
// responsive support and webp support | |
return ` | |
<picture> | |
<source media="(max-width: 799px)" srcset="assets/images/small-webp/${name}.webp" type="image/webp" /> | |
<source media="(min-width: 800px)" srcset="assets/images/large-webp/${name}.webp" type="image/webp" /> | |
<source media="(max-width: 799px)" srcset="assets/images/small/${name}.jpg" type="image/jpeg" /> | |
<source media="(min-width: 800px)" srcset="assets/images/large/${name}.jpg" type="image/jpeg" /> | |
<img class="c12 h100" src="assets/images/large/${name}.jpg" alt="img" /> | |
</picture> | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment