Re:How to think about HTML responsive images
by troupo on Tuesday April 09, 2024 @02:27AM
(#39976647)
So, the question remains: how do I supply various dynamic densities in different formats?
[ Parent
| on HN ]
Re:How to think about HTML responsive images
by danburzo on Tuesday April 09, 2024 @03:22AM
(#39976933)
I haven’t explicitly mentioned it in the article, but `srcset` + `sizes` is a way to provide dynamic densities for one image format, then multiply that with one `<source>` for each image format:
<picture>
<source srcset='…' sizes='…' type='image/avif'>
<source srcset='…' sizes='…' type='image/webp'>
<img srcset='…' sizes='…'>
</picture>
If this is what you mean, maybe it would be better to include in the article?