• Resolved rose18

    (@rose18)


    Hi there,

    For the core image block, I would like to remove some setting controls. I want to remove the controls under ‘Image Dimensions’, such as the custom size fields and the image size presets. This is the screenshot of the fields that I want to disable: https://snipboard.io/AKtHn8.jpg

    Is there a way to remove/disable those fields using the ‘blocks.registerBlockType’ filter hook? or in a similar way?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • darerodz

    (@darerodz)

    Hi @rose18, unfortunately, there is currently no way to remove those setting controls as they are not ‘block supports’ but part of the block edit component.

    What you can do instead is to hide them using custom CSS code. Those controls you mentioned have the class block-editor-image-size-control, so you can change the display attribute to none, and they will disappear.

    Hope it helps.

    Thread Starter rose18

    (@rose18)

    Thank you for your help @darerodz !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable custom image size control in core image block’ is closed to new replies.