_wp_get_image_size_from_meta( string $size_name, array $image_meta ): array|false

In this article

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

Gets the image size as array from its meta data.

Description

Used for responsive images.

Parameters

$size_namestringrequired
Image size. Accepts any registered image size name.
$image_metaarrayrequired
The image meta data.

Return

array|false Array of width and height or false if the size isn’t present in the meta data.
  • 0 int
    Image width.
  • 1 int
    Image height.

Source


	return $dirname;
}

/**
 * Gets the image size as array from its meta data.
 *
 * Used for responsive images.
 *
 * @since 4.4.0
 * @access private
 *
 * @param string $size_name  Image size. Accepts any registered image size name.
 * @param array  $image_meta The image meta data.
 * @return array|false {

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

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