Make WordPress Core


Ignore:
Timestamp:
09/06/2022 09:13:17 PM (4 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/functions.php

    r54085 r54086  
    2626                        unlink( $file );
    2727                }
     28
     29                add_filter( 'image_editor_output_format', '__return_empty_array' );
     30        }
     31
     32        /**
     33         * Tear down the class.
     34         */
     35        public function tear_down() {
     36                remove_filter( 'image_editor_output_format', '__return_empty_array' );
     37                parent::tear_down();
    2838        }
    2939
Note: See TracChangeset for help on using the changeset viewer.