Summery Summery
Registers an image size for the post thumbnail.
Syntax Syntax
Parameters Parameters
- $width
-
(Required) Image width in pixels.
- $height
-
(Required) Image height in pixels.
- $crop
-
(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 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 ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |
See also See also
- add_image_size(): for details on cropping behavior.