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

    r52837 r54086  
    1818        require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
    1919
     20        add_filter( 'image_editor_output_format', '__return_empty_array' );
     21
    2022        // This needs to come after the mock image editor class is loaded.
    2123        parent::set_up();
     
    3032
    3133        $this->remove_added_uploads();
     34
     35        remove_filter( 'image_editor_output_format', '__return_empty_array' );
    3236
    3337        parent::tear_down();
Note: See TracChangeset for help on using the changeset viewer.