Is there a way to prevent image resizing on the core/image block?

[ad_1]

I’m writing a custom card-row block using `<InnerBlocks>`. The card widths will always be set by the front-end css so I want to turn off the resizing feature on the core/image block (the little blue handles).

At the moment I’m just using css in the editor to hide the handles.

.components-resizable-box__container > div {
display: none;
}

Is there a better way to do this in the `block.json` or in the block registration? I’m pretty new to writing blocks and I’m pulling my hair out trying to find an answer to this in the docs!

Thanks in advance 🙂

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer