image_make_intermediate_size

SummerySummery

Resizes an image to make a thumbnail or intermediate size.

Syntax

image_make_intermediate_size( string $file, int $width, int $height, bool $crop = false )

DescriptionDescription

The returned array has the file size, the image width, and image height. The ‘image_make_intermediate_size’ filter can be used to hook in and change the values of the returned array. The only parameter is the resized file path.

ParametersParameters

$file

(string) (Required) File path.

$width

(int) (Required) Image width.

$height

(int) (Required) Image height.

$crop

(bool) (Optional) Whether to crop image to specified width and height or resize.

Default value: false

ReturnReturn

(array|false) Metadata array on success. False if no image was created.

SourceSource

File: wp-includes/media.php


			

ChangelogChangelog

Changelog
Version Description
2.5.0 Introduced.
Scroll to Top