Title: _wp_add_additional_image_sizes
Published: November 12, 2019
Last modified: May 20, 2026

---

# _wp_add_additional_image_sizes()

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#description)
 * [Source](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Adds additional default image sub-sizes.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#description)󠁿

These sizes are meant to enhance the way WordPress displays images on the front-
end on larger, high-density devices. They make it possible to generate more suitable`
srcset` and `sizes` attributes when the users upload large images.

The sizes can be changed or removed by themes and plugins but that is not recommended.

The size “names” reflect the image dimensions, so changing the sizes would be quite
misleading.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#source)󠁿

    ```php
    function _wp_add_additional_image_sizes() {
    	// 2x medium_large size.
    	add_image_size( '1536x1536', 1536, 1536 );
    	// 2x large size.
    	add_image_size( '2048x2048', 2048, 2048 );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/media.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/media.php#L5692)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/media.php#L5692-L5697)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#related)󠁿

| Uses | Description | 
| [add_image_size()](https://developer.wordpress.org/reference/functions/add_image_size/)`wp-includes/media.php` |

Registers a new image size.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/?output_format=md#comment-content-6722)
 2.   [alordiel](https://profiles.wordpress.org/alordiel/)  [  3 years ago  ](https://developer.wordpress.org/reference/functions/_wp_add_additional_image_sizes/#comment-6722)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_add_additional_image_sizes%2F%23comment-6722)
    Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_add_additional_image_sizes%2F%23comment-6722)
 4. To remove those two image sizes you can use the code below:
 5.     ```php
        add_action( 'init', 'wpdocs_remove_default_additional_image_sizes' );
        function wpdocs_remove_default_additional_image_sizes() {
            remove_image_size( '1536x1536' );
            remove_image_size( '2048x2048' );
        }
        ```
    
 6. Code can be added to `functions.php` file of the theme.
 7.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_add_additional_image_sizes%2F%3Freplytocom%3D6722%23feedback-editor-6722)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_add_additional_image_sizes%2F)
before being able to contribute a note or feedback.