On this page
apply_filters( 'wp_calculate_image_srcset_meta', array $image_meta, int[] $size_array, string $image_src, int $attachment_id )
Pre-filters the image meta to be able to fix inconsistencies in the stored data.
Parameters
$image_metaarray-
The image meta data as returned by 'wp_get_attachment_metadata() '.
$size_arrayint[]-
An array of requested width and height values.
- int
The width in pixels.
1intThe height in pixels.
- int
$image_srcstring-
The
'src'of the image. $attachment_idint-
The image attachment ID or 0 if not supplied.
Source
File: wp-includes/media.php. View all references
$image_meta = apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id );
Related
Used By
| Used By | Description |
|---|---|
| wp_calculate_image_srcset() wp-includes/media.php | A helper function to calculate the image sources to include in a ‘srcset’ attribute. |
Changelog
| Version | Description |
|---|---|
| 4.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_calculate_image_srcset_meta