Make WordPress Core


Ignore:
Timestamp:
09/06/2022 09:13:17 PM (2 years ago)
Author:
adamsilverstein
Message:

Media: Output WebP by default when uploading JPEGs.

Uploaded JPEGs will automatically be converted to WebP sub-sizes instead of JPEG, saving space and making sites faster.

The original JPEG upload is always retained and can be accessed by calling wp_get_original_image_url.

Props azaozz, flixos90.
Fixes #55443.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/intermediateSize.php

    r52389 r54086  
    66 */
    77class Tests_Image_Intermediate_Size extends WP_UnitTestCase {
     8    /**
     9     * Set up the test fixture.
     10     */
     11    public function set_up() {
     12        add_filter( 'image_editor_output_format', '__return_empty_array' );
     13
     14        parent::set_up();
     15    }
     16
    817    public function tear_down() {
    918        $this->remove_added_uploads();
     
    1322        remove_image_size( 'false-width' );
    1423        remove_image_size( 'off-by-one' );
     24
     25        remove_filter( 'image_editor_output_format', '__return_empty_array' );
     26
    1527        parent::tear_down();
    1628    }
Note: See TracChangeset for help on using the changeset viewer.