[wp-trac] [WordPress Trac] #35725: Add WebP support.

WordPress Trac noreply at wordpress.org
Thu Mar 11 01:49:27 UTC 2021


#35725: Add WebP support.
-------------------------------------------------+-------------------------
 Reporter:  markoheijnen                         |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Media                                |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-testing  |     Focuses:
  has-unit-tests                                 |
-------------------------------------------------+-------------------------

Comment (by atjn):

 Replying to [comment:72 adamsilverstein]:
 > In addition to creating four WebP sizes when a WebP is uploaded, we
 should do the same when users upload a jpg, automatically substituting the
 WebP version for output.

 Before you create an auto-convert module like this, please consider the
 following:

 - Because WebP-compression is fundamentally different from JPEG, auto-
 conversion is very hard without introducing weird artefacts or ending up
 with WebP files that are larger than the original JPEG. JPEG also has
 support for different image encodings and metadata that would be stripped
 when converted to WebP.

 - [https://jpeg.org/jpegxl/ JPEG XL] is likely to be supported in all
 browsers within this year, and it has none of these issues. The underlying
 compression is the same as JPEG, it has support for all of the extra
 features in JPEG and it has better compression than WebP.

 - JPEG XL also has strong support for lossless images, so it could
 essentially be implemented as the de-facto standard for images in WP that
 could accept any input image without compromising on quality or
 performance.

 If it was up to me, I would only use WebP when the user or a converter
 plugin uploads it, and then I would invest the time I saved in building
 support for JPEG XL.

 An early official decoder is already available: [https://gitlab.com/wg1
 /jpeg-xl]
 You can follow browser implementation here: [https://caniuse.com/jpegxl]

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


More information about the wp-trac mailing list