[wp-trac] [WordPress Trac] #30180: wp_get_attachment_image_src does not return alt or meta

WordPress Trac noreply at wordpress.org
Sat May 14 02:13:02 UTC 2016

#30180: wp_get_attachment_image_src does not return alt or meta
 Reporter:  joedolson                  |       Owner:  joedolson
     Type:  defect (bug)               |      Status:  accepted
 Priority:  normal                     |   Milestone:  4.6
Component:  Media                      |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  needs-testing needs-patch  |     Focuses:  accessibility

Comment (by joedolson):

 I think this is a great plan. A few questions come to mind:

 Which attributes should we return?

 Is the purpose of the `wp_get_attachment_image_data()` function to return
 all data about the attachment image, or only what's required to generate
 the `img` element? E.g., should we return the caption? Should we return
 the internal image title (as opposed to the title attribute)? Should we
 return any custom meta fields available for the attachment?

 I'm inclined to think that it should only be the fields needed for the
 `img` element, but we should probably decide that before building a patch.

Ticket URL: <https://core.trac.wordpress.org/ticket/30180#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list