apply_filters( 'wp_get_attachment_image', string $html, int $attachment_id, string|int[] $size, bool $icon, string[] $attr )

HTML img element representing an image attachment.

Parameters Parameters


(string) HTML img element or empty string on failure.


(int) Image attachment ID.


(string|int[]) Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).


(bool) Whether the image should be treated as an icon.


(string[]) Array of attribute values for the image markup, keyed by attribute name. See wp_get_attachment_image().

Top ↑

Source Source

File: wp-includes/media.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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