WP_REST_Attachments_Controller::get_special_image_sizesprivate staticWP 7.1.0

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

Each of these is handled on its own in {@see self::sideload_item()} and stored under its own key by {@see self::finalize_item()}, so unlike a regular sub-size none of them may appear in an array of names sharing one file.

Method of the class: WP_REST_Attachments_Controller{}

No Hooks.

Returns

string[]. Special image size names.

Usage

$result = WP_REST_Attachments_Controller::get_special_image_sizes(): array;

Changelog

Since 7.1.0 Introduced.

WP_REST_Attachments_Controller::get_special_image_sizes() code WP 7.1

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',
	);
}