Title: WP_REST_Attachments_Controller::get_special_image_sizes
Published: August 20, 2026

---

# WP_REST_Attachments_Controller::get_special_image_sizes(): string[]

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_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.

Returns the image size names which name a single file rather than a sub-size.

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

Each of these is handled on its own in [WP_REST_Attachments_Controller::sideload_item()](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/sideload_item/)
and stored under its own key by [WP_REST_Attachments_Controller::finalize_item()](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/finalize_item/),
so unlike a regular sub-size none of them may appear in an array of names sharing
one file.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/get_special_image_sizes/?output_format=md#return)󠁿

 string[] Special image size names.

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

    ```php
    private static function get_special_image_sizes(): array {
    	return array(
    		'original',
    		'scaled',
    		// Source-format original (e.g. the HEIC kept alongside its JPEG derivative).
    		self::IMAGE_SIZE_SOURCE_ORIGINAL,
    		// Converted-video companions for an animated GIF (the MP4/WebM and its poster).
    		'animated_video',
    		'animated_video_poster',
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php#L2597)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php#L2597-L2607)

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

| Used by | Description | 
| [WP_REST_Attachments_Controller::validate_image_size_names()](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/validate_image_size_names/)`wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php` |

Validates an image size name, or an array of names sharing a single file.

  | 
| [WP_REST_Attachments_Controller::finalize_item()](https://developer.wordpress.org/reference/classes/wp_rest_attachments_controller/finalize_item/)`wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php` |

Finalizes an attachment after client-side media processing.

  |

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

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

## User Contributed Notes

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