WP_Image_Editor::resize()publicWP 3.5.0

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.

Метод класса: WP_Image_Editor{}

Хуков нет.




$WP_Image_Editor = new WP_Image_Editor();
$WP_Image_Editor->resize( $max_w, $max_h, $crop );
$max_w(int|null) (обязательный)
Image width.
$max_h(int|null) (обязательный)
Image height.
По умолчанию: false

Список изменений

С версии 3.5.0 Введена.

Код WP_Image_Editor::resize() WP 6.1.1

abstract public function resize( $max_w, $max_h, $crop = false );