At minimum, either a height or width must be provided.If one of the two is set to null, the resize will maintain aspect ratio according to the provided dimension.
Parameters
$max_wint|null
Image width.
$max_hint|null
Image height.
$cropbool|arrayoptional
Image cropping behavior. If false, the image will be scaled (default). If true, image will be cropped to the specified dimensions using center positions. If an array, the image will be cropped using the array to specify the crop location: @type string $0 The x crop position. Accepts 'left', 'center', or 'right'.Default: false
$1string
The y crop position. Accepts 'top', 'center', or 'bottom'.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-image-editor.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.