Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_get_attachment_image_sizes()

3 tags 1 category

wp_get_attachment_image_sizes() — Retrieves the value for an image attachment’s ‘sizes’ attribute.

Inputs: $attachment_id (int): Image attachment ID. $size (string|int[]): Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default ‘medium’. $image_meta (array|null): Optional. The image meta data as returned by ‘wp_get_attachment_metadata()’. Default null.

Returns string|false: A valid source size value for use in a ‘sizes’ attribute or false.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…