Site logo

Archived topic

Hero Images and Webp

3 replies · Started by Sam on May 15, 2021

Viewing posts 1–4 of 4

I am using short-pixel to create webp images and then WP_Rocket to serve them via their webp cache file

I know that both of these plug-ins exclude images in CSS - but I am sure there quite a few people with LCP issues where page.hero is being flagged as the possible reason

Is there anyway CSS or PHP to use the webp version of an page.hero (if one exist)

That's a different plug-in which then serves the images on the fly - just a whole bag of other issues, as it requires a rather ropey JScript (added 1sec on scores)

Unfortunately i don't know of any other solutions. Swapping out CSS on the fly based upon browser support (of webP) and the availability of the image would require some client side JS and/or a server side functionality.

This archived topic is closed to new replies.