-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Media & Text Block: Image not rendered properly on frontend when inside stack #68609
Copy link
Copy link
Open
Labels
[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When a Media Text block is created within a stack and an image is added without accompanying text, the block renders correctly in the editor. However, on the frontend, it is rendered without a defined width, causing the image to be hidden.
Expected Behavior
The image should be rendered with an appropriate width, making it visible on the frontend, even if no text is present.
Actual Behavior
The image is rendered without a defined width, causing it to be hidden on the frontend.
Please Note
I am working on the issue, discovered while working on #65605. Only happens with block themes.
Step-by-step reproduction instructions
- Add a Media Text block inside a Stack block.
- Upload or select an image for the Media Text block.
- Leave the text field empty and Enable crop to fit.
- Preview the frontend of the page.
Screenshots, screen recording, code snippet
Frontend
Editor
Environment info
WordPress version: 6.7
Browser(s): Safari, Chrome
OS: MAC
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.

