Skip to content

Conversation

@nani-samireddy
Copy link
Contributor

@nani-samireddy nani-samireddy commented Nov 8, 2025

Summary

Fixes #2216

Relevant technical choices

This change exposes background image attachment IDs and original URLs from block attributes (core/group and core/cover) as data attributes on the rendered HTML element, and uses those attributes in Image Prioritizer to pick and serve a more appropriate-sized background image. It enables downsizing background images based on collected URL Metrics (preferring desktop metrics to avoid serving overly small images to desktop visitors).

Use of AI Tools

@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

❌ Patch coverage is 76.08696% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.91%. Comparing base (7938a41) to head (5ed9644).

Files with missing lines Patch % Lines
...rioritizer-background-image-styled-tag-visitor.php 70.00% 6 Missing ⚠️
...ns/auto-sizes/includes/improve-calculate-sizes.php 80.76% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2258      +/-   ##
==========================================
+ Coverage   68.86%   68.91%   +0.04%     
==========================================
  Files          90       90              
  Lines        7610     7656      +46     
==========================================
+ Hits         5241     5276      +35     
- Misses       2369     2380      +11     
Flag Coverage Δ
multisite 68.91% <76.08%> (+0.04%) ⬆️
single 35.54% <45.65%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nani-samireddy nani-samireddy marked this pull request as ready for review November 8, 2025 06:48
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

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: nani-samireddy <[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce maximum image size used as background image based on container width

1 participant