# Show Custom Image Sizes in the Editor Size Menu

> Adds every image size registered by your theme and plugins to the size dropdown in the editor and media modal, instead of only Thumbnail, Medium, Large and Full.

- Type: PHP
- Runs: Run everywhere
- Category: [Media](https://wpide.com/library/category/media/)
- Tags: image-sizes, editor, media
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/custom-sizes-in-image-size-menu/

## Code

```php
add_filter( 'image_size_names_choose', function ( $sizes ) {
    foreach ( wp_get_registered_image_subsizes() as $name => $data ) {
        if ( isset( $sizes[ $name ] ) || in_array( $name, array( 'medium_large', '1536x1536', '2048x2048' ), true ) ) {
            continue;
        }

        $sizes[ $name ] = sprintf( '%s (%d x %d)', ucwords( str_replace( array( '-', '_' ), ' ', $name ) ), $data['width'], $data['height'] );
    }

    return $sizes;
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Show Custom Image Sizes in the Editor Size Menu" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
