Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 5 years ago

#8839 closed enhancement (duplicate)

Filter to alter wp_get_attachment_image()

Reported by: dnusim Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Media Keywords: needs-patch
Focuses: Cc:


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)

11 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to Future Release

#2 @Denis-de-Bernardy
11 years ago

  • Component changed from General to Media
  • Owner anonymous deleted

#3 @Denis-de-Bernardy
11 years ago

  • Milestone changed from Future Release to 2.9

#4 @Sam_a
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

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

#5 @DrewAPicture
5 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.