Skip to content

Aspect Ratio not preserved when changing width of Image Block #76697

@eoinsav

Description

@eoinsav

Description

Feature added here: #53652

When you select an Aspect Ratio for an image in the Image Block and then change the Alignment to Wide Width or Full Width, the Aspect Ratio is not preserved.

However, the Aspect Ratio dropdown does not change if you leave the Styles tab open. If the Content or Settings tab is open, the Aspect Ratio dropdown is reset to Original.

Step-by-step reproduction instructions

Test 1:

  1. Add a new Post
  2. Add an Image Block
  3. Change the Aspect Ratio, e.g. "Square - 1:1"
  4. Leave the Styles tab open
  5. Update the Image Alignment to Wide Width or Full Width
  6. View that the Aspect Ratio dropdown is unchanged
  7. View that the image no longer has a Square Aspect Ratio
  8. Switch to the Content or Settings tab and then switch back to the Styles tab
  9. View that the Aspect Ratio has changed back to "Original"

Test 2:

  1. Add a new Post
  2. Add an Image Block
  3. Change the Aspect Ratio, e.g. "Square - 1:1"
  4. Switch to the Content or Settings tab
  5. Update the Image Alignment to Wide Width or Full Width
  6. View that the image no longer has a Square Aspect Ratio
  7. Switch back to the Styles tab
  8. View that the Aspect Ratio has changed back to "Original"

Switching from Wide Width or Full Width to None appears to preserve the Aspect Ratio.

Screenshots, screen recording, code snippet

Screen.Capture.on.2026-03-19.at.11-56-44.mp4

Environment info

Gutenberg Version 22.7.0 or WordPress Version 7.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ImageAffects the Image Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions