Last active
November 30, 2019 18:32
-
-
Save feliciaceballos/459d8dc5beea8f8c5a0d9250610603df to your computer and use it in GitHub Desktop.
Responsive WordPress Retina Images
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
<picture> | |
<source | |
media="(min-width: 900px)" | |
srcset="large-image_1x.jpeg 1x, large-image_retina.jpeg 2x" | |
type="image/jpeg > | |
<source | |
media="(min-width: 601px)" | |
srcset="medium-image_1x.webp 1x, medium-image_retina.jpeg 2x" | |
type="image/jpeg" > | |
<source | |
media="(max-width: 600px)" | |
srcset="small-image_1x.webp 1x, small-image_1x.jpeg 1x" | |
type="image/jpeg" > | |
<img | |
src="large-image_1x.jpg" | |
type="image/jpeg" | |
alt="my image description"> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment