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

Glossary Term

wp_calculate_image_sizes()

3 tags 1 category

wp_calculate_image_sizes() — Creates a ‘sizes’ attribute value for an image.

Inputs: $size (string|int[]): Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). $image_src (string|null): Optional. The URL to the image file. Default null. $image_meta (array|null): Optional. The image meta data as returned by ‘wp_get_attachment_metadata()’. Default null. $attachment_id (int): Optional. Image attachment ID. Either $image_meta or $attachment_id is needed when using the image size name as argument for $size. Default 0.

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…