Instead of using display:none on the body during the early eager phase, the commerce boilerplate uses visibility: hidden. Content that is hidden that way will still be layouted by the browser and this causes the browser to change the loading priority of images from low to high which loads images immediately even below the fold before LCP.
develop (breakpoint at scripts.js line 373 before any decoration happens)
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.
Instead of using
display:none
on the body during the early eager phase, the commerce boilerplate usesvisibility: hidden
. Content that is hidden that way will still be layouted by the browser and this causes the browser to change the loading priority of images fromlow
tohigh
which loads images immediately even below the fold before LCP.develop (breakpoint at scripts.js line 373 before any decoration happens)
visibility-fix (same breakpoint)
Test URLs: