apply_filters( ‘image_downsize’, bool|array $downsize, int $id, string|int[] $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

$downsizebool|array
Whether to short-circuit the image downsize.
$idint
Attachment ID for image.
$sizestring|int[]
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).

Source

$out = apply_filters( 'image_downsize', false, $id, $size );

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.