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

WordPress Trac noreply at wordpress.org
Mon Mar 13 05:57:03 UTC 2017


#27399: Filter the HTML output of wp_get_attachment_image
-------------------------+------------------------------
 Reporter:  fgirardey    |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  3.8.1
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------

Comment (by pcfreak30):

 I am making a new plugin that removes the width and height string since it
 is really not needed if using srcset, but I can't do it easily since it
 hardcoded in
 {{{
 $hwstring
 }}}
  and not passed via filter
 {{{
 wp_get_attachment_image_attributes
 }}}


 So the statement that all attributes can be changed is false. I have to
 now resort to output buffering to solve this.

 Thanks.

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


More information about the wp-trac mailing list