Created
November 20, 2018 09:27
-
-
Save Simply1993/21dfa8de464f8818aa68cb0c274f63cd to your computer and use it in GitHub Desktop.
High-DPI images, different image types & art direction use case
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
<!-- source: https://dev.opera.com/articles/responsive-images/ --> | |
<picture> | |
<source | |
media="(min-width: 1024px)" | |
srcset="opera-fullshot-1x.webp 1x, | |
opera-fullshot-2x.webp 2x, | |
opera-fullshot-3x.webp 3x" | |
type="image/webp"> | |
<source | |
media="(min-width: 1024px)" | |
srcset="opera-fullshot-1x.jpg 1x, | |
opera-fullshot-2x.jpg 2x, | |
opera-fullshot-3x.jpg 3x"> | |
<source | |
srcset="opera-closeup-1x.webp 1x, | |
opera-closeup-2x.webp 2x, | |
opera-closeup-3x.webp 3x" | |
type="image/webp"> | |
<img | |
src="opera-closeup-1x.jpg" alt="The Oslo Opera House" | |
srcset="opera-closeup-2x.jpg 2x, | |
opera-closeup-3x.jpg 3x"> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment