-
-
Save Wilto/27d6925e8c1a71a87a03 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
<picture> | |
<source media="(min-width: 800px)" srcset="pic-big.jpg 1x, pic-big-hd.jpg 2x"> | |
<source media="(min-width: 400px)" srcset="pic-med.jpg 1x, pic-med-hd.jpg 2x"> | |
<img src="small.jpg" alt="…"> | |
</picture> | |
<img | |
src-2="(min-width: 400px) pic-med.jpg 1x, pic-med-hd.jpg 2x" | |
src-1="(min-width: 800px) pic-big.jpg 1x, pic-big-hd.jpg 2x" | |
src="small.jpg" | |
alt="…"> |
@patik, if the change is that drastic, then the developer is doing img wrong.
@patik, to be clear, we don't want to introduce something new that would allow the developer to do what you describe.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose each image file has different content because of art direction — for example, the three images in this CSS Tricks article under the heading "Do I care about art direction?". If the change is drastic enough, you might need different
alt
values depending on which image has loaded.Have you considering allowing for, er, alternate
alt
andtitle
values?