WordPress at a glance
filter is not described

wp_get_attachment_image filter-hook . WP 5.6.0

HTML img element representing an image attachment.


add_filter( 'wp_get_attachment_image', 'filter_function_name_4010', 10, 5 );
function filter_function_name_4010( $html, $attachment_id, $size, $icon, $attr ){
	// filter...

	return $html;
HTML img element or empty string on failure.
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.
Array of attribute values for the image markup, keyed by attribute name. See wp_get_attachment_image().


Since 5.6.0 Introduced.

Where the hook is called

wp-includes/media.php 1115
return apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr );

Where in WP core the hook is used WordPress

Usage not found.