A WordPress-centric search engine for devs and theme authors

image_downsize ›

apply_filters( 'image_downsize', false, $id, $size )
Parameters: (3)
  • (bool) $downsize Whether to short-circuit the image downsize. Default false.
    Required: Yes
  • (int) $id Attachment ID for image.
    Required: Yes
  • (array|string) $size Size of image. Image size or array of width and height values (in that order). Default 'medium'.
    Required: Yes
Defined at:

Filters whether to preempt the output of image_downsize().

Passing a truthy value to the filter will effectively short-circuit down-sizing the image, returning that value as output instead.


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