[wp-trac] [WordPress Trac] #55443: Create WebP sub-sizes and use for output

WordPress Trac noreply at wordpress.org
Wed Jul 27 21:48:37 UTC 2022


#55443: Create WebP sub-sizes and use for output
-------------------------------------------------+-------------------------
 Reporter:  adamsilverstein                      |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  Media                                |     Version:  6.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note needs-docs needs-user-docs commit         |  performance
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:"55443-fix-secondary-scaled.diff"] (also
 https://github.com/WordPress/wordpress-develop/pull/3031) is a small patch
 to fix an issue where the secondary mime type would not get the correct
 "scaled" treatment because the meta sizes passed were those returned
 **after** the original image was "scaled" (resized). The patch corrects
 this by temporarily setting the original meta's size (width,height) values
 before calling `_wp_make_additional_mime_types`.

 This ensures the secondary mime type image (eg WebP) is properly resized
 and gets the `-scaled` name suffix. We already do the same for the exif
 "Orientation" attribute to ensure secondary mime images are properly
 rotated.

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


More information about the wp-trac mailing list