Reputation: 15626
Here is my <picture>
element on page:
<picture>
<source media="(max-width: 6400px)" srcset="./images/large.jpg 1024w" sizes="100vw" />
</picture>
But when I open my page in Chrome browser, I can't see any picture. Even no image is requested in devtools network panel.
I checked caniuse.com, that the Chrome 42 is support <picture>
element.
So why the <picture>
does't work?
Upvotes: 1
Views: 735
Reputation: 10125
You are missing the <img>
inside <picture>
. Change your HTML to:
<picture>
<source media="(max-width: 6400px)"
srcset="./images/large.jpg 1024w" sizes="100vw" />
<img src="default.jpg" alt="my images" />
</picture>
Upvotes: 0