Hi, thanks for your answer. To make srcset work effectively – you need to define the sizes attribute. WP sets this based on the selected image size pretty naive way: 100vw until you reach the size of the image.
So in the case you take “full” image size, the sizes (and width and height) get to the dimensions of the full-size image and that’s pointless until you use a smaller device.
In my case, I have image 1920x1000px (because it could be used as a hero). My text container is 1080px, but the image gets inserted this way:
<img loading="lazy" width="1920" height="1000" class="swiper-lazy wp-image-1077 swiper-lazy-loaded" src="https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1.jpg" alt="" style="object-fit: cover; object-position: 34% 44%;" data-title="HP_1920_1000_1" srcset="https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1.jpg 1920w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-720x375.jpg 720w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-1080x563.jpg 1080w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-360x188.jpg 360w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-768x400.jpg 768w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-1600x833.jpg 1600w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-280x146.jpg 280w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-1320x688.jpg 1320w, https://terezav.dameweb.cz/wp-content/uploads/2021/12/hp_1920_1000_1-128x67.jpg 128w" sizes="(max-width: 1920px) 100vw, 1920px">
This means, that on-screen larger than 1080px I load almost two times the larger image I need.
I believe this is a pretty common issue and srcset won’t help until you have control over the dimension.