Function: wp_create_thumbnail

wp_create_thumbnail( mixed $file, integer $max_side, mixed $deprecated )

This was once used to create a thumbnail from an Image given a maximum side size.

Parameters

Name Type(s) Default Value Description
$file mixed

Filename of the original image, Or attachment id.

$max_side integer

Maximum length of a single side for the thumbnail.

$deprecated mixed ''

Never used.

Returns

string

Thumbnail path on success, Error string on failure.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.