[wp-trac] [WordPress Trac] #34430: Improve the performance of wp_make_content_images_responsive()

WordPress Trac noreply at wordpress.org
Wed Oct 28 13:33:53 UTC 2015


#34430: Improve the performance of wp_make_content_images_responsive()
------------------------------------------------+------------------------
 Reporter:  joemcgill                           |       Owner:  joemcgill
     Type:  defect (bug)                        |      Status:  assigned
 Priority:  normal                              |   Milestone:  4.4
Component:  Media                               |     Version:  trunk
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch needs-testing needs-docs  |     Focuses:
------------------------------------------------+------------------------

Comment (by jaspermdegroot):

 34430.7.diff contains all changes from 34430.6.diff plus:
 - A few more corrections in inline docs.
 - Check if {{{wp_get_attachment_metadata()}}} has returned an array: Users
 that allow SVGs in their WordPress installation reported errors in the
 RICG responsive images plugin repo (see
 [https://github.com/ResponsiveImagesCG/wp-tevko-responsive-
 images/issues/208] for example) which can be prevented by checking if
 {{{wp_get_attachment_metadata}}} has returned an array.
 - Only add the srcset attribute if there will be a sizes attribute as
 well: We already did check if we can set both attributes in
 {{{wp_image_add_srcset_and_sizes()}}} but not in
 {{{wp_get_attachment_image()}}}.

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


More information about the wp-trac mailing list