WordPress at Your Fingertips
filter is not described

wp_image_src_get_dimensions filter-hook . WP 5.7.0

Filters the wp_image_src_get_dimensions


add_filter( 'wp_image_src_get_dimensions', 'filter_function_name_8243', 10, 4 );
function filter_function_name_8243( $dimensions, $image_src, $image_meta, $attachment_id ){
	// filter...

	return $dimensions;
Array with first element being the width and second element being the height, or false if dimensions could not be determined.
The image source file.
The image meta data as returned by 'wp_get_attachment_metadata()'.
The image attachment ID.


Since 5.7.0 Introduced.

Where the hook is called

wp-includes/media.php 1644
return apply_filters( 'wp_image_src_get_dimensions', $dimensions, $image_src, $image_meta, $attachment_id );

Where in WP core the hook is used WordPress

Usage not found.