apply_filters( ‘wp_get_attachment_image_src’, array|false $image, int $attachment_id, string|int[] $size, bool $icon )

In this article

Filters the attachment image source result.


Array of image data, or boolean false if no image is available.
  • string
    Image source URL.
  • 1 int
    Image width in pixels.
  • 2 int
    Image height in pixels.
  • 3 bool
    Whether the image is a resized image.
Image attachment ID.
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
Whether the image should be treated as an icon.


return apply_filters( 'wp_get_attachment_image_src', $image, $attachment_id, $size, $icon );



User Contributed Notes

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