[wp-trac] [WordPress Trac] #34341: Limit the size of images included in srcset attributes

WordPress Trac noreply at wordpress.org
Sat Oct 17 20:26:09 UTC 2015


#34341: Limit the size of images included in srcset attributes
--------------------------+-----------------------------------
 Reporter:  joemcgill     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:  has-patch 2nd-opinion
  Focuses:                |
--------------------------+-----------------------------------
 Since #33641, all available intermediate sizes of an image that are the
 same aspect ratio will be included in the image's `srcset` attribute.

 In some cases, this may cause users to download unnecessarily large
 images. For example, if the original image is using the large size in the
 `src` attribute and the only larger option available for retina devices is
 an uncompressed full-size image, a browser could end up downloading a very
 large file.

 While we can't filter images based on the file size, we can set an upper
 limit on the width of images that are included in `srcset` attributes by
 default and allow theme authors to filter the value as needed.

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


More information about the wp-trac mailing list