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: - Introduced in WordPress: 4.4.0
- Deprecated in WordPress: —
Description
Retrieves the value for an image attachment's 'sizes' attribute.