Warning: This function has been deprecated. Use image_resize() instead.

wp_create_thumbnail( mixed $file, int $max_side, mixed $deprecated = '' )

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


Description Description


Parameters Parameters

$file

(mixed) (Required) Filename of the original image, Or attachment id.

$max_side

(int) (Required) Maximum length of a single side for the thumbnail.

$deprecated

(mixed) (Optional) Never used.

Default value: ''


Top ↑

Return Return

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


Top ↑

Source Source

File: wp-admin/includes/deprecated.php

function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
	_deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
	return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note.