-
Notifications
You must be signed in to change notification settings - Fork 227
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
Closes #6530 #6531 #6532 #6534 #6535 #6552: Preload images markup #6559
Closes #6530 #6531 #6532 #6534 #6535 #6552: Preload images markup #6559
Conversation
@Miraeld Independently of the review, can you provide some info about test & validation of the content of this PR? I am thinking mostly: what templates has this been tested against to validate the new markups? Is there new tests passing on Rocket-E2e, or tests/templates that should be covered by this that are not passing? |
@MathieuLamiot , In terms of detection and saving the data itself (role of the How I've been testing it: Some are not available yet, so I've built my own on the same structure as we would do for e2e. |
There should be E2E checking what is saved in DB after a visit on the page, and running on many templates from the QA team. @jeawhanlee should be able to show you, that's what he implemented last cooldown sprint. |
@MathieuLamiot totally agreed, |
The type was hardcoded as `img`, now it becomes dynamic and set by the `lcp-beacon.js` script.
Preload `image-set` & `webkit-image-set`
Preload layered background images
Preload single background images
Preload responsive images
Preload pictures tags
da215e9
to
dcf4bd4
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation |
As discussed here, this PR is likely to miss the AC about ATF exclusion of Lazyload for elements that are not "img" (so video, picture, p, main, div) |
Well I can add them here. I may be on the path to have a solution but need some optimization :) |
41f5192
into
feature/lcp-above-the-fold-optimization
Description
Fixes #6530 #6531 #6532 #6534 #6535 #6552
This PR addresses several issues related to image preloading, specifically for images detected as Largest Contentful Paint (LCP) and Above The Fold (ATF) images. The changes ensure that various types of images are correctly preloaded and excluded from lazy loading to improve page load performance. Additionally, it fixes an issue where background images identified as the LCP were incorrectly labeled as 'img' in the database, they are now correctly labeled dynamically.
Documentation
User documentation
This update improves the page load performance by correctly preloading various types of images and excluding them from lazy loading when they are detected as Largest Contentful Paint (LCP) and Above The Fold (ATF) images. This means faster loading times for your website visitors.
Technical documentation
The code works by identifying images that are LCP and ATF, and then preloading these images to improve page load performance. It also correctly labels background images identified as LCP with the corrected type in the database. The changes are implemented across several files, including JavaScript for front-end changes and PHP for back-end changes.
Type of change
New dependencies
n/a
Risks
n/a
Checklists
Feature validation
Documentation
Code style