Skip to content
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

Priority hint LCP experiment stopped showing unless the image has a fetchPriority attr already #2421

Closed
scottjehl opened this issue Oct 5, 2022 · 0 comments
Assignees
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest

Comments

@scottjehl
Copy link
Contributor

I think this change knocked it out of the suggestions for any image that doesn't have a fetchPriority attribute in the markup.
b7931d2

Both of these work instead.

if (!$isBG && !$isVideo && !isset($lcp['element']['fetchPriority']) || $lcp['element']['fetchPriority'] != 'high') {

or
if (!$isBG && !$isVideo && !(isset($lcp['element']['fetchPriority']) && $lcp['element']['fetchPriority'] == 'high')) {

I think the second one is better because we should show this experiment if there's a fetchPriority="low" on there for some reason.

@scottjehl scottjehl added the Type: Bug An issue or pull request relating to a bug in WebPageTest label Oct 5, 2022
@scottjehl scottjehl self-assigned this Oct 5, 2022
@tkadlec tkadlec closed this as completed in 413cab9 Oct 5, 2022
tkadlec added a commit that referenced this issue Oct 5, 2022
Fixes #2421 - LCP priority hint experiment suggestion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest
Projects
None yet
Development

No branches or pull requests

1 participant