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/resize.php

    r53463 r54086  
    1515
    1616        add_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) );
     17        add_filter( 'image_editor_output_format', '__return_empty_array' );
     18    }
     19
     20    /**
     21     * Tear down the class.
     22     */
     23    public function tear_down() {
     24        remove_filter( 'image_editor_output_format', '__return_empty_array' );
     25        parent::tear_down();
    1726    }
    1827
Note: See TracChangeset for help on using the changeset viewer.