Description
add_filter( 'block_editor_settings', function( $editor_settings ) { $editor_settings['imageSizes'][] = [ 'slug' => 'square-thumbnail-retina', 'name' => 'Square Thumbnail Retina', ]; return $editor_settings; } );
Adds one or more custom defined thumbnail sizes to the Block Editor. For use in Image and Latest Posts blocks. These custom sizes come from your theme, plugins, or custom calls to add_image_size().
add_filter( 'block_editor_settings', function( $editor_settings ) { $editor_settings['imageSizes'][] = [ 'slug' => 'square-thumbnail-retina', 'name' => 'Square Thumbnail Retina', ]; return $editor_settings; } );