[wp-trac] [WordPress Trac] #34678: Responsive Images: Check if content images already have a sizes attribute

WordPress Trac noreply at wordpress.org
Mon Nov 23 22:01:32 UTC 2015


#34678: Responsive Images: Check if content images already have a sizes attribute
----------------------------+------------------------
 Reporter:  jaspermdegroot  |       Owner:  joemcgill
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  4.4
Component:  Media           |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------

Comment (by azaozz):

 In 34678.2.diff:
 - Change the behavior of `wp_make_content_images_responsive()` to skip
 images that have either srcset or sizes attributes.
 - Revert the sizes attribute check in `wp_image_add_srcset_and_sizes()`.
 The function name suggests that it will add the two attributes.
 - Change the test added in r35678 to check for no changes to the <img> tag
 when the sizes attribute is present.

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


More information about the wp-trac mailing list