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

WordPress Trac noreply at wordpress.org
Wed Aug 17 23:12:34 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 azaozz):

 > This ticket introduces the capability to generate more than a single
 mime type. For example, when users upload JPEG images, WordPress can
 automatically generate both WebP and JPEG sub-sized images.

 Like @MatthiasReinholz, @eatingrules, and others I think this approach is
 perhaps lacking. Why would there be twice as many image files taking up a
 lot of extra space when half of them will never ever be used anywhere?

 IMHO a better approach would be to just make all image sub-sizes WEBP. If
 JPEGs are indeed needed, these can be generated on-the-fly as needed.
 There is no point of clogging the web servers storage with all these
 useless files.

 On the other hand, if the WEBP file sizes are actually larger than the
 JPEGs, that would probably mean that better tools are needed, and this
 patch is premature.

 BTW, this functionality is available in WordPress since few versions ago.
 Is there any data to how much it is used, and how well it works. Thing
 such data would be crucial in deciding whether to keep working on this for
 now.

 Another shortcoming seems to be that only some image sub-sizes will be
 converted to WEBPs. Not sure why, doesn't seem to make sense?

 Another thing that seems to not make sense is the idea to replace images
 in post_content by default. Why would this be needed? Only newly uploaded
 images will have WEBP sub-sizes, right? Why would WP spend so much
 resources looking for them for old images?

 (I understand, given enough storage space some users will probably
 "regenerate images" and create WEBP sub-sizes. But this will be the
 exception, not the rule. Such exception should be handled by a plugin.
 Doesn't seem a good idea to slow down millions of sites just because of
 that possibility.)

 > Resources for generating images when you upload an image will increase
 dramatically, however resources to serve an image...

 Actually that dramatic increase of resources usage when uploading an image
 is a very bad side effect here. It means a lot of uploads will fail, and
 leave the users stranded. It also will increase support requests for both
 WordPress and the hosting companies dramatically. Don't think this is
 acceptable. Even if image multi-mime support is needed in WordPress, the
 current approach doesn't seem like a good solution.

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


More information about the wp-trac mailing list