WP_Image_Editor::multi_resize()publicWP 3.5.0

Resize multiple images from a single source.

Method of the class: WP_Image_Editor{}

No Hooks.

Return

Array. An array of resized images metadata by size.

Usage

$WP_Image_Editor = new WP_Image_Editor();
$WP_Image_Editor->multi_resize( $sizes );
$sizes(array) (required)

An array of image size arrays.

Default: sizes are 'small', 'medium', 'large'

  • ...$0(array)

    • width(int)
      Image width.

    • height(int)
      Image height.

    • crop(true|false|array)
      Optional. Whether to crop the image.
      Default: false

Changelog

Since 3.5.0 Introduced.

WP_Image_Editor::multi_resize() code WP 6.5.2

abstract public function multi_resize( $sizes );