The last update broke my workflow, as the method of using custom image size inside the media manager has definitely changed.

i'm trying to add my previously registered image sizes to the new dropdown.

  • Add your code to your question please. – fuxia Dec 15 '12 at 15:10

You will need to paste your code in order for us to review where the issue is, however, I can demonstrate how I accomplish this in Wordpress v3.5

Please observe the comments in my_insert_custom_image_sizes:

function my_insert_custom_image_sizes( $sizes ) {
    // get the custom image sizes
    global $_wp_additional_image_sizes;
    // if there are none, just return the built-in sizes
    if ( empty( $_wp_additional_image_sizes ) )
        return $sizes;

    // add all the custom sizes to the built-in sizes
    foreach ( $_wp_additional_image_sizes as $id => $data ) {
        // take the size ID (e.g., 'my-name'), replace hyphens with spaces,
        // and capitalise the first letter of each word
        if ( !isset($sizes[$id]) )
            $sizes[$id] = ucfirst( str_replace( '-', ' ', $id ) );

    return $sizes;

function custom_image_setup () {
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'custom-image-size-1', 160, 9999 ); //  small columned
    add_image_size( 'custom-image-size-2', 300, 9999 ); //  medium
    add_image_size( 'custom-image-size-3', 578, 190, true ); //  cropped
    add_filter( 'image_size_names_choose', 'my_insert_custom_image_sizes' );

add_action( 'after_setup_theme', 'custom_image_setup' );

Note that I am adding the my_insert_custom_image_sizes filter in the after_setup_theme which is a good practice.

  • Did this answer help you? If so, please upvote/accept as correct. – Christine Cooper Dec 20 '12 at 14:42

Assuming you added a custom image size in after_setup_theme and it has an id such as below ...

... add_image_size( 'other-thumb', 240, 200, true ); 

You can add a filter which will add the size to the list of sizes in the new media manager. Just make sure to pass in the id/slug and then title you want in the dropdown and wallah!

// Add other image size options to insert image dialog
add_filter('image_size_names_choose', 'xf_more_sizes', 4, 1);
function xf_more_sizes($sizes){
   $sizes['other-thumb'] = __('Othernail');
   return $sizes;

This was helpful for me:

function setup_image_sizes() {

    if ( function_exists( 'add_image_size' ) ) {

        add_image_size( 'image-retina', 576, 320, true );

    function pc_image_sizes($sizes){

        $sizes['image-retina'] = __('Image');
        return $sizes;

    add_filter('image_size_names_choose', 'pc_image_sizes');

add_action( 'after_setup_theme', 'setup_image_sizes' );
  • Please explain why that could solve the problem. – fuxia Jan 20 '13 at 16:56
  • I had the same problem, I spent several days looking for a solution. Tried dozens of solutions, and only this has helped me. – Stanislau Ladutska Apr 4 '13 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.