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/wp create thumbnail


This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use any of these functions instead.

Contents

Description

This function was deprecated in 3.5. Use wp_get_image_editor() instead.

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

Parameters

$file
(mixed) (required) Filename of the original image, Or attachment id.
Default: None
$max_side
(integer) (required) Maximum length of a single side for the thumbnail.
Default: None
$deprecated
(mixed) (required) Function was never used
Default: None

Return

(string) 
Thumbnail path on success, Error string on failure

Change Log