A WordPress-centric search engine for devs and theme authors



wp_get_attachment_image ›

Since5.6.0
Deprecatedn/a
apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr )
Parameters: (5)
  • (string) $html HTML img element or empty string on failure.
    Required: Yes
  • (int) $attachment_id Image attachment ID.
    Required: Yes
  • (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).
    Required: Yes
  • (bool) $icon Whether the image should be treated as an icon.
    Required: Yes
  • (string[]) $attr Array of attribute values for the image markup, keyed by attribute name. See wp_get_attachment_image().
    Required: Yes
Defined at:
Codex:

HTML img element representing an image attachment.





Source

return apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr );