Skip to content

Instantly share code, notes, and snippets.

@feliciaceballos
Last active April 10, 2019 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feliciaceballos/eb6ac94ac902617c72e56937791db0d2 to your computer and use it in GitHub Desktop.
Save feliciaceballos/eb6ac94ac902617c72e56937791db0d2 to your computer and use it in GitHub Desktop.
Add Custom Images Sizes to Gutenberg Image Block
<?php
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