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

WordPress Trac noreply at wordpress.org
Thu Mar 13 14:48:55 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       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Hi everyone, I've got an idea, maybe a bad one, but i think it could be
 useful to add a filter to the '''wp_get_attachment_image''' function for
 the html output.
 In my case, a plugin that i use for lazy load is filtering html output of
 post thumbnails, i would like to let this plugin filter my
 '''wp_get_attachment_image''' output.


 Something like that :
 {{{
         return apply_filters( 'attachment_image_html', $html,
 $attachment_id, $size, $attr );
 }}}

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


More information about the wp-trac mailing list