wp_get_attachment_image_sizes


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

Parameters:
  • (int) attachment_id Image attachment ID.
  • (string|int[]) size Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default 'medium'.
  • (array|null) image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. Default null.
See:
Returns:
  • (string|false) 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, wp_get_attachment_image_srcset, wp_get_attachment_image_url, wp_get_attachment_id3_keys

Top Google Results

User discussions

wpseek mobile