[wp-trac] [WordPress Trac] #36477: Responsive images(srcset) feature makes images fatter.

WordPress Trac noreply at wordpress.org
Tue Apr 12 00:08:32 UTC 2016


#36477: Responsive images(srcset) feature makes images fatter.
----------------------------+------------------------------
 Reporter:  peterdavehello  |       Owner:  joemcgill
     Type:  defect (bug)    |      Status:  reviewing
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Upload          |     Version:  4.4.2
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  performance
----------------------------+------------------------------
Changes (by joemcgill):

 * owner:   => joemcgill
 * status:  new => reviewing


Comment:

 Hi @peterdavehello,

 Welcome to the Trac, and thank you for the report.

 I assume that your are referring to the file size (KB) of the images and
 not the dimensional size of the images (width x height). In which case,
 you are correct. Resizing an indexed color image like a PNG or GIF to a
 smaller size can oftentimes increase the overall file size because of the
 way the resampling process works (see: #30402). This is not an uncommon
 result among other image editors as well, but is most noticeable in use
 cases where the source image has gone through an optimization process
 before being uploaded.

 The default image compression improvements that will be included in
 WordPress 4.5 (see: #33642) help with this problem, but the smaller images
 can still be larger than the full size images at times. However, for users
 who aren't optimizing their images before uploading (a majority of users,
 I suspect), using `srcset` and `sizes` often results in a significant
 reduction in file size, so we

 Since WordPress has no awareness of the file size of each image when it is
 writing the image markup, I'm not sure what we can do to avoid this
 situation entirely, except to continue to make improvements on the default
 compression strategy for indexed color images.

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


More information about the wp-trac mailing list