Function: _wp_get_image_size_from_meta

_wp_get_image_size_from_meta( string $size_name, array $image_meta )

Get the image size as array from its meta data.

Used for responsive images.


Name Type(s) Default Value Description
$size_name string

Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.).

$image_meta array

The image meta data.


array | boolean

Array of width and height values in pixels (in that order) or false if the size doesn't exist.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.