Core Function
View Source on Trac ↗ image_downsize()
image_downsize( mixed $id, mixed $size = 'medium' ) Scales an image to fit a particular size (such as 'thumb' or 'medium').
Parameters 2 required
| Name / Type | Description |
|---|---|
| $id int | Attachment ID for image. Required |
| mixed | (string | int[]) $size Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default 'medium'. Required |
Return Value
((array)
(array | false) {
Array of image data, or boolean false if no image is available.
Function Information
Since Version
2.5.0
Source File
wp-includes/media.php
Advertisement