“Add Media” only shows “Full Size” under Attachment Display Settings

In order to show new image dimension options in the WordPress admin media library you would need to use the image_size_names_choose filter to assign them a name.

So the code in your functions.php should look something like this:

if ( function_exists( 'add_image_size' ) ) {
    add_image_size( 'single-post-medium', 515 );
    add_image_size( 'single-post-small', 250 );
}

add_filter( 'image_size_names_choose', 'my_custom_sizes' );

function my_custom_sizes( $sizes ) {
    return array_merge( $sizes, array(
        'single-post-medium' => __('Your Medium Size Name'),
        'single-post-small' => __('Your Small Size Name'),
    ) );
}

If they do not show right away, you may need to publish an image first and return to the media library and check again.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)