Adding custom preview image to custom block style
-
Hello. I have used the register block style to sucessfully add pre-set style options to the group and image blocks. This is great. For example, using:
register_block_style('core/group', array( 'name' => 'outlined-box', 'label' => __( 'Outlined Box' ), 'style_handle' => 'outlined-box', ) );However when you look at the style tab on the block editor it uses the default images. For example the group block just shows a basic text image and the image block the default image. I want to add my own images on the preview so that they visually represent what the style they create when selected.
How do I set the preview image in the register block style?
The topic ‘Adding custom preview image to custom block style’ is closed to new replies.