why Google Speed Insights doesn't detect WEBP even when there are the images created by EWWW and chrome browser detects them as image/WEBP, is there a way to add Chrome-lighthouse UserAgent?
I already replied to this question.
Webp capabilities are not detected by user-agent.
portofacil Hello dear Porto, this post was older than your answer, but still an active problem. Pagespeed score is heavily affected on WordOps sites because it doesn't serve images based on User agent, Headers are not executed the same on tools like Google PSI or other optimization tools.
I use Lighthouse to check my sites, and I've never seen this kind of issue.
Perhaps you are using Cloudflare in front of your domain; in such a case you gotta use a Worker to emulate the webp rewrite capabilites of WordOps' Nginx.
If someone is interested in a starting point, this is the Worker I use to conditionally serving webp and avif through Cloudflare.
It can be enhanced, but it works right now.
portofacil Dear porto, Youre right im behind cloudflare THANKS! i'm gonna test that worker and post here my results.
Works like a charm, Thank You!
for Anyone interested the rule i applied the worker Portofacil post here was *domain.tdl/wp-content/uploads/* because
*domain.tdl* as cloudflare suggested gives performance issues with some ajax and RevoSlider, and push Google PSI score down.
phantomxxx Well done. I forgot to mention that. It's better to keep the worker under uploads only — because of billing — since workers are billed upon requests.
Hosted by VirtuBox