Skip to content

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' );
}

@github-actions
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 <devansh2002@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>

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