WPDev.one
Core Function
View Source on Trac ↗

set_post_thumbnail_size()

set_post_thumbnail_size( mixed $width = 0, mixed $height = 0, mixed $crop = false )

Registers an image size for the post thumbnail.

Parameters 1 required

Name / Type Description
$width
int

Image width in pixels.

$height
int

Image height in pixels.

mixed

(bool | array) $crop { Optional. Image cropping behavior. If false, the image will be scaled (default). If true, image will be cropped to the specified dimensions using center positions. If an array, the image will be cropped using the array to specify the crop location:

Required

Return Value

(void)
No return value description available.

Function Information

Since Version
2.9.0
Source File
wp-includes/media.php
Advertisement