#8839 closed enhancement (duplicate)
Filter to alter wp_get_attachment_image()
| Reported by: | dnusim | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 2.7 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
Description
I would like to alter the HTML generated by wp_get_attachment_image() in wp-includes/media.php with a plugin.
Would appreciate it if a filter could be added.
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You can use the filter hook
wp_get_attachment_image_attributes(added in 2.8 from ticket #8732) to change any of the<img/>attributes output from wp_get_attachment_image().