wp_get_attachment_image_sizes


wp_get_attachment_image_sizes ( $attachment_id, $size = 'medium', $image_meta = null )

Parameters:
  • (int) $attachment_id Image attachment ID.
  • (array|string) $size Optional. Image size. Accepts any valid image size, or an array of width and height values in pixels (in that order). Default 'medium'.
  • (array) $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. Default null.
See:
Returns:
  • (string|bool) A valid source size value for use in a 'sizes' attribute or false.
Defined at:

Description

Retrieves the value for an image attachment's 'sizes' attribute.

Related Functions

wp_get_attachment_image_src, wp_get_attachment_image_srcset, wp_get_attachment_image, wp_get_attachment_image_url, wp_get_attachment_id3_keys

Top Google Results

User discussions

wpseek mobile