Title: wp_create_thumbnail
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_create_thumbnail( mixed $file, int $max_side, mixed $deprecated ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#wp--skip-link--target)

This function has been deprecated since 3.5.0. Use [image_resize()](https://developer.wordpress.org/reference/functions/image_resize/)
instead.

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

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#see-also)󠁿

 * [image_resize()](https://developer.wordpress.org/reference/functions/image_resize/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#parameters)󠁿

 `$file`mixedrequired

Filename of the original image, Or attachment ID.

`$max_side`intrequired

Maximum length of a single side for the thumbnail.

`$deprecated`mixedrequired

Never used.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#return)󠁿

 string Thumbnail path on success, Error string on failure.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/deprecated.php#L1135)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/deprecated.php#L1135-L1138)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#related)󠁿

| Uses | Description | 
| [image_resize()](https://developer.wordpress.org/reference/functions/image_resize/)`wp-includes/deprecated.php` |

Scale down an image to fit a particular size and save a new copy of the image.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_create_thumbnail/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.5.0](https://developer.wordpress.org/reference/since/3.5.0/) | Deprecated. Use [image_resize()](https://developer.wordpress.org/reference/functions/image_resize/)  | 
| [1.2.0](https://developer.wordpress.org/reference/since/1.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_create_thumbnail%2F)
before being able to contribute a note or feedback.