#34341 closed defect (bug) (fixed)
Limit the size of images included in srcset attributes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Media | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (9)
This ticket was mentioned in Slack in #feature-respimg by joemcgill. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
Add
$max_srcset_width
and default to 1600px