On this page
apply_filters( 'wp_calculate_image_sizes', string $sizes, string|int[] $size, string|null $image_src, array|null $image_meta, int $attachment_id )
Filters the output of ‘wp_calculate_image_sizes() ’.
Parameters
$sizesstring-
A source size value for use in a
'sizes'attribute. $sizestring|int[]-
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
$image_srcstring|null-
The URL to the image file or null.
$image_metaarray|null-
The image meta data as returned by wp_get_attachment_metadata() or null.
$attachment_idint-
Image attachment ID of the original image or 0.
Source
File: wp-includes/media.php. View all references
return apply_filters( 'wp_calculate_image_sizes', $sizes, $size, $image_src, $image_meta, $attachment_id );
Related
Used By
| Used By | Description |
|---|---|
| wp_calculate_image_sizes() wp-includes/media.php | Creates a ‘sizes’ attribute value for an image. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_calculate_image_sizes