3 ms·
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
by danburzo 2y ago
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?
- troupo 2y agoAh, perfect. For some reason I didn't realise that source has the same attributes as img. If it's not too much work, I think it would be good to add to the article for completeness :)