On this page
apply_filters( 'wp_image_src_get_dimensions', array|false $dimensions, string $image_src, array $image_meta, int $attachment_id )
Filters the ‘wp_image_src_get_dimensions’ value.
Parameters
$dimensionsarray|false-
Array with first element being the width and second element being the height, or false if dimensions could not be determined.
$image_srcstring-
The image source file.
$image_metaarray-
The image meta data as returned by 'wp_get_attachment_metadata() '.
$attachment_idint-
The image attachment ID. Default 0.
Source
File: wp-includes/media.php. View all references
return apply_filters( 'wp_image_src_get_dimensions', $dimensions, $image_src, $image_meta, $attachment_id );
Related
Used By
| Used By | Description |
|---|---|
| wp_image_src_get_dimensions() wp-includes/media.php | Determines an image’s width and height dimensions based on the source file. |
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_image_src_get_dimensions