WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/image make intermediate size

Description

Resize an image to make a thumbnail or intermediate size.

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

Usage

<?php image_make_intermediate_size$file$width$height$crop ); ?>

Parameters

$file
(string) (required) File path.
Default: None
$width
(int) (required) Image width.
Default: None
$height
(int) (required) Image height.
Default: None
$crop
(boolean) (optional) Optional, default is false. Whether to crop image to specified height and width or resize.
Default: false

Return Values

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

Change Log

Since: 2.5

Source File

image_make_intermediate_size() is located in wp-includes/media.php