Make WordPress Core

Opened 3 weeks ago

Closed 2 weeks ago

#63615 closed defect (bug) (duplicate)

Twenty Twenty: Inline image in paragraph renders as block on frontend

Reported by: rishabhwp's profile rishabhwp Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: ui, css Cc:

Description

In the Twenty Twenty theme, when an image is inserted inline within a paragraph block in the WordPress block editor, it is rendered with display: inline in the backend (editor), which matches WYSIWYG expectations.

However, on the frontend, the same image is rendered with display: block, causing layout issues and breaking the inline flow of the paragraph.

This behavior is inconsistent and violates the WYSIWYG principle.

Steps to Reproduce

  1. Create or edit a post.
  2. Add a paragraph block and insert an image inline with the text.
  3. Save and view the post on the frontend.

Editor

https://i.ibb.co/QvfBxWWR/backend.png

Frontend

https://i.ibb.co/zW8NXX3n/frontend.png

Attachments (1)

63615.diff (383 bytes) - added by rishabhwp 3 weeks ago.
Patch for Ticket #63615

Download all attachments as: .zip

Change History (4)

@rishabhwp
3 weeks ago

Patch for Ticket #63615

#1 @rishabhwp
3 weeks ago

After Patch Frontend

https://i.ibb.co/qQPZ2xQ/after-patch.png

#2 @shreya0shrivastava
3 weeks ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60301
  • PHP: 8.2.28
  • Server: Apache/2.4.62 (Debian)
  • Database: mysqli (Server: 11.8.2-MariaDB-ubu2404 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 137.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty 2.9
  • MU Plugins: None activated
  • Plugins:
    • Gutenberg 21.0.0
    • Test Reports 1.2.0

Actual Results

  1. ✅ Error condition occurs (reproduced).

Supplemental Artifacts

  1. Editor Screenshot

https://i.ibb.co/PZr4vz1N/Screenshot-2025-06-23-at-3-40-25-PM.png

  1. Front end Screenshot

https://i.ibb.co/gMncWRZ5/Screenshot-2025-06-23-at-3-40-41-PM.png

Last edited 3 weeks ago by shreya0shrivastava (previous) (diff)

#3 @sabernhardt
2 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

This is already reported on #50418.

Note: See TracTickets for help on using tickets.