[wp-trac] [WordPress Trac] #27399: Filter the HTML output of wp_get_attachment_image

WordPress Trac noreply at wordpress.org
Thu Mar 13 17:00:45 UTC 2014


#27399: Filter the HTML output of wp_get_attachment_image
-------------------------------+------------------------------
 Reporter:  fgirardey          |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Media              |     Version:  3.8.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by tomauger):

 * keywords:   => reporter-feedback


Comment:

 Hi! Thanks for posting this suggestion and patch. Can you provide more
 background on what you expect the filter to be used for? Are you replacing
 the HTML wholesale? or just moving the image SRC into a data-attribute?

 Have you considered the `wp_get_attachment_image_attributes` filter for
 adding attributes to the image tag?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27399#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list