Post Featured Image: Add UI toggle for using first image from post#76817
Post Featured Image: Add UI toggle for using first image from post#76817
Conversation
|
Size Change: +77 B (0%) Total Size: 7.73 MB
ℹ️ View Unchanged
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7bb6395 to
7f8690e
Compare
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| onChange={ () => | ||
| setAttributes( { | ||
| useFirstImageFromPost: | ||
| ! useFirstImageFromPost, |
There was a problem hiding this comment.
Could we add useFirstImageFromPost: false to the resetAll handler above?
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This is testing as expected, I think it´s time we have this in the UI :) |
Probably a follow up 👍🏻 |
|
Flaky tests detected in 7147756. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23676087077
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@WordPress/gutenberg-design can you all help review this to ensure it’s the right direction/approach? |




What?
Follow up to #56573
Adds a UI toggle to the Post Featured Image block for the
useFirstImageFromPostattribute that was added in #56573 but not exposed in the editor.Why?
PR #56573 added the ability to fall back to the first image in a post's content when no featured image is set, but the setting was only available by editing block markup directly. This makes the feature discoverable and usable from the block's settings panel.
How?
ToggleControlinside aToolsPanelItemin the block's inspector settings panel.!storedFeaturedImage), since it's a fallback behavior.useFirstImageFromPostto the panel'sresetAllhandler.Testing Instructions
Testing Instructions for Keyboard
Screenshots
Use of AI Tools
This PR was authored with Claude Code (Claude Opus 4.6).