Add custom image sizes to the WordPress media upload image size menu

When adding a custom image size in your WordPress functions file using add_image_size() it is not automatically added to your media upload image size dropdown menu. To add your new image size use:

add_filter( 'image_size_names_choose', 'my_custom_sizes' );

function my_custom_sizes( $sizes ) {
    return array_merge( $sizes, array(
        'your-custom-size' => __('Your Custom Size Name'),
    ) );

Source: http://codex.wordpress.org/Plugin_API/Filter_Reference/image_size_names_choose

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s