Uses
| Uses | Description |
|---|---|
| wp-includes/media.php: add_image_size() | Register a new image size. |
Registers an image size for the post thumbnail.
(int) (Required) Image width in pixels.
(int) (Required) Image height in pixels.
(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
add_theme_support( 'post-thumbnails' ); in its functions.php file. See also Post Thumbnails.File: wp-includes/media.php
function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
add_image_size( 'post-thumbnail', $width, $height, $crop );
} | Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/set_post_thumbnail_size