The new The media attribute tells the browser at which width (or more specific which minimum width) the image should be shown. The srcset attribute gives the location of the file as src does in usual <picture>
<source media="(min-width: 1400px)" srcset="largest-image.jpg" />
<source media="(min-width: 1000px)" srcset="large.jpg" />
<source media="(min-width: 750px)" srcset="medium.jpg" />
<source media="(min-width: 500px)" srcset="small.jpg" />
<img src="fallback-image.jpg" loading="lazy" />
</picture> element tags.
Picture Featured Image Post
Posted on:
- Tagged:
- picture