WordPress at a glance
function is not described

wp_shrink_dimensions() WP 2.0.0

Deprecated in 3.0.0. It is no longer supported and can be removed in future releases. Use wp_constrain_dimensions() instead.

Calculates the new dimensions for a downsampled image.

No Hooks.

Return

Array. Shrunk dimensions (width, height).

Usage

wp_shrink_dimensions( $width, $height, $wmax, $hmax );
$width(int) (required)
Current width of the image
$height(int) (required)
Current height of the image
$wmax(int)
Maximum wanted width
Default: 128
$hmax(int)
Maximum wanted height
Default: 96

Notes

  • See: wp_constrain_dimensions()

Changelog

Since DEL 3.0.0 Introduced.

Code of wp shrink dimensions: wp-admin/includes/deprecated.php WP 5.2.2

<?php
function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
	return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
}