On this page
apply_filters( 'wp_get_attachment_image_src', array|false $image, int $attachment_id, string|int[] $size, bool $icon )
Filters the attachment image source result.
Parameters
$imagearray|false-
Array of image data, or boolean false if no image is available.
- string
Image source URL.
1intImage width in pixels.2intImage height in pixels.3boolWhether the image is a resized image.
- string
$attachment_idint-
Image attachment ID.
$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).
$iconbool-
Whether the image should be treated as an icon.
Source
File: wp-includes/media.php. View all references
return apply_filters( 'wp_get_attachment_image_src', $image, $attachment_id, $size, $icon );
Related
Used By
| Used By | Description |
|---|---|
| wp_get_attachment_image_src() wp-includes/media.php | Retrieves an image to represent an attachment. |
Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_src