2

I am using the srcset to offer high res images on displays with a high pixel density, using a srcset, like so;

<picture>
    <source srcset="/images/512x256.webp 512w, /images/1024x512.webp 2x, images/1536x1024.webp 3x" type="image/webp">
    <source srcset="/images/512x256.jpg" type="image/jpeg">
    <img src="/images/512x256.jpg" alt="Image">
</picture>

It works great, but Pagespeed insights complains and tells me I should deliver the right format images for mobile devices. The idea of the srcset is go give the the browser multiple versions in higher resolutions. And ofcourse a 3x image is 3x as big as the 1x. All I do is offer the browser multiple versions so it has the possibility to serve hq images for devices with a high DPI. The browser can make a smart descision and serve the best image depending on the device and situation. So why is Pagespeed insights giving this penalty?

larsvg
  • 21
  • 1

0 Answers0