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

Set fetchpriority to low if image is in the initial viewport #1320

Closed
wants to merge 2 commits into from

Conversation

devansh016
Copy link
Contributor

Summary

Set fetchpriority to low if image is in the initial viewport but is not visible

Fixes #1309

Relevant technical choices

if ( ! $is_visible ) {
	$walker->set_attribute( 'fetchpriority', 'low' );
}

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: devansh016 <[email protected]>
Co-authored-by: westonruter <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@devansh016 devansh016 changed the title Set fetchpriority to low if image is in the initial viewport but is n… Set fetchpriority to low if image is in the initial viewport Jun 25, 2024
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. See feedback in #1309 (comment)

@swissspidy swissspidy added [Plugin] Image Prioritizer Issues for the Image Prioritizer plugin (dependent on Optimization Detective) [Type] Feature A new feature within an existing module labels Jul 26, 2024
@devansh016 devansh016 closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Image Prioritizer Issues for the Image Prioritizer plugin (dependent on Optimization Detective) [Type] Feature A new feature within an existing module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occluded initial-viewport images should get fetchpriority=low
3 participants