[wp-trac] [WordPress Trac] #57238: Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless + Smaller in size than original

WordPress Trac noreply at wordpress.org
Fri Feb 3 20:18:35 UTC 2023


#57238: Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless
+ Smaller in size than original
-----------------------------+------------------------------
 Reporter:  abitofmind       |       Owner:  adamsilverstein
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  Future Release
Component:  Media            |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  performance
-----------------------------+------------------------------

Comment (by adamsilverstein):

 > By best practises: Which ensure that the sized versions are by tendency
 never larger than the input and have a certain agreed-upon quality level.

 Ah, I see your point - when the generated images are larger that the
 original, it may not make sense to include them.

 This is something we could do when building the srcset then - we have all
 the file sizes at that point. If we see this we could skip those images in
 the srcset. I 'm not sure we could handle it when generating the images
 though.

 I think this deserves a separate trac ticket, it is a pretty distinct
 issue from the handling of Lossless and Alpha transparency on upload and I
 believe has more to do with te srcset we generate.


 > The main goal of Responsive Images is definitely asset loading speed

 Yes... that is one goal and it is also about serving the right sized image
 for the viewer (device). For example, screen size but also screen density
 - part of this might be sending larger assets to HighDPI devices for
 example, which are larger images and would load slower, but look much
 better.

 > Avoid adding unnecessary extra metadata (color profile, etc) or other
 chunks which are not present in the source.

 WordPress already removes meta data on uploads, for speed and privacy
 reasons.

 > And if users reports an example where this is violated, then adapt the
 algorithm accordingly:

 We may not be able to predict which images would be larger, but we could
 avoid serving them. Would this only happen with the large or full sized
 image?

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


More information about the wp-trac mailing list