Skip to content

Image block: Add the ability to disable resizing from external #60690

@jasperck

Description

@jasperck

What problem does this address?

It seems like it is impossible to remove ResizeBox from the Image block from external, I tried allowResize in provideContext which is the pattern in Gutenberg Gallery block, however, it requires me to wrap the Image block with another layer of component, otherwise, it won't work. I think it’s overkill in this case because now we need an extra custom block to wrap the Image block just for the context.

What is your proposed solution?

I'm thinking of adding a new attribute so we can enable/disable resizing from external.

disableResize: {
    "type": "boolean",
    "default": false,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    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