Webp images when browser is ready and jpg as fallback

Is there a way to set up Blocs to use webp images when the browser can handle them and otherwise fall back to jpg? Like mentioned here for example:

<picture>
    <source srcset="image.webp" type="image/webp">
    <source srcset="image.jpg" type="image/jpeg">
    <img src="image.jpg">
</picture>

Preferably without using code blocks, but perhaps not possible?

You might want to read this thread started by @Flashman not long ago:

There are various solutions mentioned there.

1 Like

Yes there is a lot more information in the other thread. At this point the only people who have to rely on Jpg are Safari users on Catalina and earlier. At a guess that is around 2-3% of desktop web browsers at most. It may be a bit higher for mobile if there are significant numbers of iPhones stuck on older OS versions. Not many of us keep a mobile for 5 years these days.

Up to now I have stuck with Jpg but the case for being limited to Jpg grows weaker every day. Blocs could really use a built in solution or a custom bric that handles this.

Wouldn’t we all like to see website show up instantly.

Thanks @Jerry! I’ve checked it out.