[wp-trac] [WordPress Trac] #52867: Add capability to set default format for image sub-sizes.

WordPress Trac noreply at wordpress.org
Fri May 14 20:45:41 UTC 2021


#52867: Add capability to set default format for image sub-sizes.
-------------------------------------------------+-------------------------
 Reporter:  adamsilverstein                      |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.8
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback has-unit-     |     Focuses:
  tests needs-testing has-testing-info           |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 Hi @Boniu91 thanks for testing this out. A couple of things to check:

 * If you are running core from the `build` branch you need to run `grunt
 build` after applying the patch.
 * Make sure you are uploading a large JPEG image, you should see the img
 source code contain references to a bunch of sub-size WebP images sizes as
 srcset entries in the image html.

 WordPress never changes your original uploaded source image, and I think
 your image in your test was small enough that is all it used. So if you
 upload a small JPEG, WordPress places that small JPEG. When you upload a
 large image though, the re-sizing routines kick in and this is where you
 will see the conversion to WebP take place.

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


More information about the wp-trac mailing list