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

    r52837 r54086  
    1919        require_once DIR_TESTROOT . '/includes/class-wp-test-stream.php';
    2020
     21        add_filter( 'image_editor_output_format', '__return_empty_array' );
     22
    2123        // This needs to come after the mock image editor class is loaded.
    2224        parent::set_up();
     
    3133
    3234        $this->remove_added_uploads();
     35
     36        remove_filter( 'image_editor_output_format', '__return_empty_array' );
    3337
    3438        parent::tear_down();
Note: See TracChangeset for help on using the changeset viewer.