Filter hook 'wp_get_attachment_image'

in WP Core File wp-includes/media.php at line 1176

Description

Filters the HTML img element representing an image attachment.

Occurrences

Filename Line Number
wp-includes/media.php 1176

Parameters

Type Name Description
string $html HTML img element or empty string on failure.
int $attachment_id Image attachment ID.
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).
bool $icon Whether the image should be treated as an icon.
string[] $attr Array of attribute values for the image markup, keyed by attribute name. See wp_get_attachment_image().

PHP Doc

/**
	 * 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().
	 */