@joy0114
Are you sure fetchpriority=high appears in html? I made a quick search and it is not present.
Hi Litetim,
Yes, I’m sure.
Here a screenshot of developer tools. Selected element is the image that we can see above.
screenshot
And a screenshot from a Pagespeed analysis:
Pagespeed capture
The class wp-image-24844 AND the path toward this image are both exclude of lazyloading in Litespeed settings.
That’s strange; Perhaps an issue on google side …? I don’t see why these people would be perfect !
Thanks you.
Hi Litetim,
Yes, indeed, it’s enabled.
Does this have anything to do with google pagespeed not seeing fetchpriority=high ?
To be precise, Instant Click is enabled, but instant_click.min.js is deferred.
Because pagespeed told me instant_click.min.js was causing a delay for displaying page.
Since I deferred it, no more complain …
@joy0114
what code is applying fetchpriority=high for that image? LSC is adding that only in instant_click js library
Thank you 🙂
Okay, now I understand your question about to known whether or not Instant Click is enabled.
I have no idea what can add fetchpriority=high to html code … Maybe it’s just WordPress.
I don’t have any image optimization plugin, nor html code optimization, apart from LSCWP.
I’ve just tried a test site with these parameters:
Instant Click>> disabled
All LSCWP functions>> disabled.
The home page, containing this image, still shows fetchpriority=high for this image.
And yet there’s no cache at all. So something other than LSCWP is adding this parameter.
I just did a search on the term “fetchpriority” with Regexxer (regexp search) on my theme (Astra), and on Astra Pro which extends Astra’s functionality :
NOTHING
I didn’t do it on the WordPress core, as there are too many files to examine and my processor is suffering …
But that doesn’t explain why fetchpriority=high isn’t correctly seen by Pagespeed…
@joy0114 revert your settings to how best fits you and I will continue debugging it
@joy0114
let’s test this code.
Add it in theme functions.php.
add_filter('wp_img_tag_add_decoding_attr', '__return_false');
Clear cache and run a google test
-
This reply was modified 10 months ago by
litetim.
I applied everything you told me: the result is identical.
To recap, with these settings:
***Instant Click activated
***instant_click js file deferred
***your code in functions.php
***Clear cache
Google pagespeed still doesn’t see that fetchpriority=high is present. However, this is the case in the page’s html code, for this image (which Google identifies as LCP).
It says:
chargement différé non appliqué
fetchpriority=high doit être appliqué
La demande est visible dans le document initial
in english:
deferred loading not applied
fetchpriority=high must be applied
The request is visible in the initial document.
I’m really sorry to bother you with this problem which is really minor …
Best regards
@joy0114 I’ve been looking into solutions and things we can test.
There is this setting in Elementor: https://elementor.com/help/image-loading-optimization/
Is it Enabled for you?
Hi Litetim,
Sorry, but I don’t use Elementor, just Gutenberg …
If you think this problem is not related to Litespeed, I might need to turn to the WordPress forum, or even Gutenberg ?
Thanks .
Best regards
@joy0114 not forgot about you, have a few things to do and I keep looking for things to test
Hi Litetimm,
No problem ! Take your time, there’s absolutely no pressure !
Best regards
Hi Litetim,
I don’t think the Litespeed plugin has anything to do with this issue.
I just found a post that describes this exact problem:
Same issue with fetchpriority=high
and above all: https://issues.chromium.org/issues/419817756
I don’t think it’s part of LSCWP’s functionality to handle image preloading.
From what I’ve seen, LSCWP handles whether or not to defer image loading, which is different from preloading.
I’m surprised that few people have noticed this issue on their WordPress sites !
I’ll probably have to look for a workaround elsewhere, directly in WordPress I suppose.
Do you think so too ?
Thank you again for your opinion.
Best regards