Several problems: consistent, Background CSS images and more
-
Hi @westonruter
We open 2 days ago ticket on the official Performance Lab support but yo RESOLVE it so i was thinking it be smarter to open separate ticket here (you told me to update you after i finish to install and test):
So first, plugin is amazing, (Image Prioritizer).
It has a lot of potential, but I’ve run into several issues and I’ll explain them from my tests and experience.Summary:
The plugin should add the fetch-priority header to important images, but it’s not consistent. Sometimes the header appears, and sometimes it doesn’t. You can see this in PageSpeed and by checking response headers. Images use stable URLs, so this inconsistency isn’t due to dynamic generation (like CSS/JS cache) and
couple of more problems related to GDPR and CSS background images.
Details and test results below.———-
- Background CSS images not getting fetch-priority.
One problem I noticed: the plugin does not appear to add fetch-priority for elements that use CSS background-image (e.g. style=”background-image: …”).
From my tests, the plugin injects code inside the div, but it does not set fetch-priority for the background image request.
Example PageSpeed report showing LCP and the background image discovery:
https://pagespeed.web.dev/analysis/https-locksmithunit-cat-serraller-navas/j9kg0lm0oe?form_factor=mobile
On the front page it works for the header background image (the header is generated by the THEME builder), but that header uses a different markup for background images. Even then, it’s not reliable, sometimes it works and sometimes it doesn’t.
———-
- Consistency (fetch-priority not applied on every visit / test).
This is the most important issue: fetch-priority is not applied consistently.
Sometimes the plugin does what it should and the fetch-priority header is present, other times the header is absent and PageSpeed shows erros:
LCP request discovery error
LCP breakdown error
I’m still testing whether this is cache-related, for example:
I cleared caches between tests and it didn’t look like a cache issue so far.For reference, I see these scripts loaded:
https://locksmithunit.com/wp-content/plugins/optimization-detective/detect.min.js?ver=1.0.0-beta3
https://locksmithunit.com/wp-content/plugins/image-prioritizer/detect.min.js?ver=1.0.0-beta2Important Note:
LiteSpeed does JS optimizations (minify and defer), and I’m checking whether that affects the plugin. If you recommend excluding either of the above scripts (or others) from LiteSpeed’s minify/defer options, tell me which one to exclude. In LiteSpeed I can exclude minify and defer separately, so we could minify without deferring if that helps.Another thing, i see your plugin ” Optimization Detective” is REST API, and litespeed cache REST API requast, if need to be exlude something you must tell me.
LiteSpeed control object cache as well, so if something need to exluded, tell me.
This doc’s of litespeed about the REST API Excludes Tab:
https://docs.litespeedtech.com/lscache/lscwp/cache/#excludes-tabPlease advise.
———-
- Possible GDPR-related problem behavior (still testing, not sure 100%).
I have three identical sites that differ only by language / jurisdiction:
https://locksmithunit.com (Locksmith Orlando) — USA — NO GDPR
https://locksmithunit.es (Cerrajero Barcelona) — EU — GDPR
https://locksmithunit.cat (Serraller Barcelona) — EU — GDPR
On the GDPR sites I don’t see the fetch-priority header and PageSpeed shows LCP request discovery errors consistently.
Pagespeed test EU website (WITH GDPR):
https://pagespeed.web.dev/analysis/https-locksmithunit-cat/swyno8jy9w?form_factor=mobileOn the U.S site (no GDPR) results look much better and the LCP errors disappear, (but not 100% consistently as i said before)
Pagespeed test USA website (NO GDPR):
https://pagespeed.web.dev/analysis/https-locksmithunit-com/279d4dvjmt?form_factor=mobileI suspect there may be some GDPR-related block or consent flow that prevents the plugin from fetching or adding the priority header. I’m not certain, I’m still testing, but there’s a noticeable difference between EU and US sites.
———-
- LiteSpeed Cache plugin (Lazy Load) — compatibility / side-by-side behavior.
I ran tests with LiteSpeed Cache’s Lazy-Load and Image Prioritizer (both enabled).
In the html code himself, and google search console, it appears your plugin and LiteSpeed lazy load can operate side-by-side (screenshot):
https://ibb.co/kgwddhTQ
But if we look on PageSpeed, its not look so well.
PageSpeed scores are lower when LiteSpeed lazy load is active long side “Image Prioritizer plugin”.
I sometimes still see fetch-priority, but overall the score isn’t as good as when Image Prioritizer runs alone.
It might be that LiteSpeed Lazy load is overriding something in the output, and i dont see it.This is not a critical problem, its more a compatibility improvement request.
LiteSpeed Cache is widely used (7+ million users):
https://wordpress.org/plugins/litespeed-cache/As i said before, litespeed cache plugin is the best plugin in the market. not only that, they also offer a full Google Cloud solution (this is what I use):
https://docs.litespeedtech.com/cloud/images/wordpress/#__tabbed_1_4LiteSpeed is not just a plugin, its a full ECO system (server, plugin GCP machine, etc).
Even a simple option like Lazy Load, matching with the OpenLiteSpeed server.
So matching your plugin with the litespeed lazyload option and make it work side by side can be much more than a simple optimazation.If you will improve compatibility of your plugin with LiteSpeed Cache’s Lazy Load and JS optimization (minify / defer) so both solutions work together reliably, that would be a very valuable enhancement.
For testing, I have one website I can sacrifice, haha (this website is less important, so I can run tests on it).
On this website, the Image Prioritizer plugin is active together with the LiteSpeed Lazy Load option (both running at the same time).
You can check it and see the code or any other behavior yourself:
https://locksmithunit.cat/———-
I know it’s was very long, sorry about that.
Maybe I repeated myself a few times, haha, but it’s all with good intentions.
I hope this explanation was clear.
I tried my best to explain each problem.Regards,
LeviThe page I need help with: [log in to see the link]
- Background CSS images not getting fetch-priority.
You must be logged in to reply to this topic.