set_post_thumbnail_size( int $width, int $height, bool|array $crop = false )

Registers an image size for the post thumbnail.


Description

See also


Parameters

$width

(int) (Required) Image width in pixels.

$height

(int) (Required) Image height in pixels.

$crop

(bool|array) (Optional) Whether to crop images to specified width and height or resize. An array can specify positioning of the crop area.

Default value: false


Source

File: wp-includes/media.php

function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
	add_image_size( 'post-thumbnail', $width, $height, $crop );
}


Changelog

Changelog
Version Description
WP-2.9.0 Introduced.