WP_Image_Editor_GD::make_subsize

SummerySummery

Create an image sub-size and return the image meta data value for it.

Syntax

WP_Image_Editor_GD::make_subsize( array $size_data )

ParametersParameters

$size_data

(array) (Required) Array of size data.

  • 'width'
    (int) The maximum width in pixels.
  • 'height'
    (int) The maximum height in pixels.
  • 'crop'
    (bool) Whether to crop the image to exact dimensions.

ReturnReturn

(array|WP_Error) The image data array for inclusion in the sizes array in the image meta, WP_Error object on error.

SourceSource

File: wp-includes/class-wp-image-editor-gd.php


			

ChangelogChangelog

Changelog
Version Description
5.3.0 Introduced.
Scroll to Top