wp_image_resize_identical_dimensions filter-hookWP 5.3.0

Filters whether to proceed with making an image sub-size with identical dimensions with the original/source image. Differences of 1px may be due to rounding and are ignored.

Usage

add_filter( 'wp_image_resize_identical_dimensions', 'wp_kama_image_resize_identical_dimensions_filter', 10, 3 );

/**
 * Function for `wp_image_resize_identical_dimensions` filter-hook.
 * 
 * @param bool $proceed The filtered value.
 * @param int  $orig_w  Original image width.
 * @param int  $orig_h  Original image height.
 *
 * @return bool
 */
function wp_kama_image_resize_identical_dimensions_filter( $proceed, $orig_w, $orig_h ){

	// filter...
	return $proceed;
}
$proceed(true|false)
The filtered value.
$orig_w(int)
Original image width.
$orig_h(int)
Original image height.

Changelog

Since 5.3.0 Introduced.

Where the hook is called

image_resize_dimensions()
wp_image_resize_identical_dimensions
wp-includes/media.php 648
$proceed = (bool) apply_filters( 'wp_image_resize_identical_dimensions', false, $orig_w, $orig_h );

Where the hook is used in WordPress

Usage not found.