WPDev.one
Core Function
View Source on Trac ↗

image_make_intermediate_size()

image_make_intermediate_size( mixed $file, mixed $width, mixed $height, mixed $crop = false )

Resizes an image to make a thumbnail or intermediate size.

Parameters 4 required

Name / Type Description
$file
string

File path.

Required
$width
int

Image width.

Required
$height
int

Image height.

Required
mixed

(bool | array) $crop { Optional. Image cropping behavior. If false, the image will be scaled (default). If true, image will be cropped to the specified dimensions using center positions. If an array, the image will be cropped using the array to specify the crop location:

Required

Return Value

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

Function Information

Since Version
2.5.0
Source File
wp-includes/media.php
Advertisement