WP_REST_Attachments_Controller::get_special_image_sizes(): string[]

In this article

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

Each of these is handled on its own in WP_REST_Attachments_Controller::sideload_item() and stored under its own key by 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

string[] Special image size names.

Source

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

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.