New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 'width' value to determine which resource to pick #240
Comments
The conflict between |
Ah, so to confirm, sizes accepts both <img src="wolf.jpg" width="400" sizes="400" alt="The rad wolf"
srcset="wolf-400.jpg 400w, wolf-800.jpg 800w, wolf-1600.jpg 1600w"> Old browsers would pick up wolf.jpg and display it at 400px based on |
Yes, Your fallback would indeed work as you described. |
Currently
width
is not used in the selection algorithm but, at least in theory, it should work just fine and I'm wondering if we should clarify this in the spec?In above example, the UA should select wolf-400.jpg for 1x devices, wolf-800.jpg for 2x, and so on. Also, note that HTML5 spec says that width must be in CSS px, so there is no need to block on layout, etc.
Also, on a related note.. What happens if I specify both width and sizes? Who wins?
The text was updated successfully, but these errors were encountered: