Skip to content

Custom Image sizes are not responsive in the editor #38381

@kjellr

Description

@kjellr

In the editor, by default, image blocks are 100% the width of their container, regardless of their actual dimensions. As soon as the user adds a custom width to their image however, that responsive guardrail is gone, and the image will flow off-screen.

responsive-image.mp4

The max-width guardrail works on the frontend. The editor discrepancy appears to be related to the in-canvas resize handles (see also).


Tested with a clean install of WordPress 5.9.
First reported over in the Twenty Twenty-Two support forums.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ImageAffects the Image Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions