Make WordPress Core


Ignore:
Timestamp:
09/06/2022 09:13:17 PM (23 months 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/post/attachments.php

    r52389 r54086  
    77 */
    88class Tests_Post_Attachments extends WP_UnitTestCase {
     9    /**
     10     * Set up the test fixture.
     11     */
     12    public function set_up() {
     13        add_filter( 'image_editor_output_format', '__return_empty_array' );
     14
     15        parent::set_up();
     16    }
    917
    1018    public function tear_down() {
    1119        // Remove all uploads.
    1220        $this->remove_added_uploads();
     21        remove_filter( 'image_editor_output_format', '__return_empty_array' );
    1322        parent::tear_down();
    1423    }
Note: See TracChangeset for help on using the changeset viewer.