-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider preload for images #6
Comments
@adamsilverstein - this is an interesting scenario. The case for preloading responsive images makes sense and has the potential to better That opens up another can of worms...how do we determine what image that is? LCP is a front-end metric, so its probably not going to be identifiable before the page loads...some ideas could be:
We have come across this scenario on a few 10up projects recently and implemented a fix or two, but nothing very robust. Food for thought! |
The problem with preloading responsive images is that the Therefore, it's probably safer for now to use priority hints, adding
Identifying the LCP images has generally been addressed by WordPress/wordpress-develop#1580 which omits
Naturally all of this would need to be theme-overridable. Block-based themes should make it even easier to identify important images. |
Yes and it's very helpful with the featured image (or with the largest image of the above the fold) I've tested on my blog that improvement seems to give a reasonable advantage for LCP but I found some difficulties because the image that is loaded must be the same and of the same resize of the one that is used in the featured image and for this you should know in the head the size of this one. Imho preloading images is profitable when the featured image is very large, preloading small or a lot of images has bad results at least with my blog. Preloading is also useful for fonts since some of them size >100kb (also in this case i got also some issues to get the real font url because preloading the stylesheet with the @import fonts has a limited effect) test result: https://imgur.com/a/T4VJZsP related to: #117 |
With |
See https://web.dev/preload-responsive-images/
https://web.dev/priority-hints/
https://caniuse.com/?search=resource%20hints
related "Automatic link preload of first user-entered image (hero image)" (suggested by Aymen Loukil)
related trac ticket: https://core.trac.wordpress.org/ticket/42438 (focused on scripts so far, could include images)
Open Question: when is preloading images helpful?
The text was updated successfully, but these errors were encountered: