Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add Custom Images Sizes to Gutenberg Image Block
add_filter( 'image_size_names_choose','wpmudev_custom_image_sizes' );
function wpmudev_custom_image_sizes( $sizes ) {
return array_merge( $sizes, array(
//Add your custom sizes here
'custom-image-square' => __( 'Square' ),
'blog-width' => __( 'Blog Content Full Width' ),
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment