PageSpeed Insights warning me:
Set an explicit width and height on image elements to reduce layout shifts and improve CLS.
But how I can fix it if I use Picture tag like this:
<picture>
<source srcset="https://via.placeholder.com/150.webp" media="(max-width: 768px)" type="image/webp">
<source srcset="https://via.placeholder.com/150.png x1, https://via.placeholder.com/300.png x2" media="(max-width: 768px)" type="image/png">
<source srcset="https://via.placeholder.com/500.webp" type="image/webp">
<source srcset="https://via.placeholder.com/500.png" type="image/png">
<img src="https://via.placeholder.com/500.png">
</picture>
I don't need in mobile version image tag with width and height 500px. I want responsive image.
Of course i can set attributes width and height in image tag with value 500 and then use !import with @media in css, but i think it's just invalid rule.
How i can avoid this warning or fix it if it possible?