WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about wp_get_attachment_image

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/media.php apply_filters 1120 /**
* Filters the HTML img element representing an image attachment.
*
* @since 5.6.0
*
* @param string $html HTML img element or empty string on failure.
* @param int $attachment_id Image attachment ID.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
* @param bool $icon Whether the image should be treated as an icon.
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
* See wp_get_attachment_image().
*/

Hook Parameters

Parameter Type Name Description
array|false $imag e {
int $attachment_id Image attachment ID.
string|int[] $size Requested image size. Can be any registered image size name, or
bool $icon Whether the image should be treated as an icon.