Skip to content

Set sizeSlug to large for featured images - #129

Merged
MaggieCabrera merged 1 commit into
WordPress:trunkfrom
josephscott:perf/sizeslug-large
Oct 2, 2026
Merged

MaggieCabrera merged 1 commit into
WordPress:trunkfrom
josephscott:perf/sizeslug-large

Conversation

@josephscott

Copy link
Copy Markdown
Contributor

Featured images don't set a sizeSlug, so they use the full size image (post-thumbnail isn't registered) and sizes claims the full viewport width. We can set sizeSlug to large and download a smaller version that is still plenty big enough for the content width.

The single and page sidebar templates and archive-photographic are left out, they can render wider than a portrait large (768px).

Testing Instructions

  1. Set a featured image 2560px+ wide on a post.
  2. View the post with the browser window wider than 1024px and the cache disabled.
  3. Check the downloaded size of the image before and after this PR.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the issue, measuring the options, and the patch. Tightly guided, directed, and reviewed.

@github-actions github-actions Bot added the [Area] Patterns Issues or PRs that touch the theme's block patterns. label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

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: josephscott <[email protected]>

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

@MaggieCabrera MaggieCabrera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this!

@MaggieCabrera
MaggieCabrera merged commit cb312ae into WordPress:trunk Oct 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Patterns Issues or PRs that touch the theme's block patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants