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

Function Reference/image make intermediate size


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.


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


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

Return Values

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