Recently, I noticed that WPT can give you some useful information about LCP.
It can identify the type of LCP, in my case it was an image LCP, and it also identified that image’s URL.
I optimized this LCP image and that improved LCP score in WBT.
I then ran separate tests on Lighthouse, but on that tool the score decreased after having optimized the LCP image.
Then I ran some WPT tests, with the Lighthouse audit option turned on, and I did notice that the LCP scores that show in the UI did not match the LCP scores from the Lighthouse audit (now included in WPT’s results).
To see these LCP scores differences I opened the WPT JSON result file. Here is an example of such a file before I optimized the LCP image.
As far as I can tell, the LCP score the WPT’s UI displays is located at the following path in the JSON:
data.runs.2.firstView.largestPaints[2].time
and has value:
3334
The corresponding Lighthouse audit score is located at the following path in the JSON:
data.runs.2.firstView.lighthouse.Performance.largest-contentful-paint
and has value:
2800.65
I would like to understand why the LCP scores WPT calculates are different than the LCP scores Lighthouse calculates.