wp_shrink_dimensions


wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )

Parameters:
  • (int) width Current width of the image
  • (int) height Current height of the image
  • (int) wmax Maximum wanted width
  • (int) hmax Maximum wanted height
See:
Returns:
  • (array) Shrunk dimensions (width, height).
Defined at:

Description

Calculates the new dimensions for a downsampled image.

Related Functions

wp_constrain_dimensions, wp_expand_dimensions, wp_image_src_get_dimensions, wp_get_audio_extensions, wp_print_editor_js

Top Google Results

User discussions

wpseek mobile