Resizes current image.
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.
$max_wint|nullrequired
$max_hint|nullrequired
$cropbool|arrayoptional
0 string'left' 'center', or 'right'.1 string'top', 'center', or 'bottom'.Default:false
Crop value:
abstract public function resize( $max_w, $max_h, $crop = false );
| Version | Description |
|---|---|
| 3.5.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor/resize