W3cubDocs

/WordPress

apply_filters( 'image_downsize', bool|array $downsize, int $id, array|string $size )

Filters whether to preempt the output of image_downsize().

Description

Returning a truthy value from the filter will effectively short-circuit down-sizing the image, returning that value instead.

Parameters

$downsize

(bool|array) Whether to short-circuit the image downsize.

$id

(int) Attachment ID for image.

$size

(array|string) Requested size of image. Image size name, or array of width and height values (in that order).

Source

File: wp-includes/media.php

View on Trac

Changelog

Version Description
2.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/image_downsize