diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index d318a275a9607..3f204f1e5727a 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -6417,6 +6417,7 @@ function wp_high_priority_element_flag( $value = null ): bool { */ function wp_get_image_editor_output_format( $filename, $mime_type ) { $output_format = array( + 'image/jpeg' => 'image/webp', 'image/heic' => 'image/jpeg', 'image/heif' => 'image/jpeg', 'image/heic-sequence' => 'image/jpeg', @@ -6426,8 +6427,8 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) { /** * Filters the image editor output format mapping. * - * Enables filtering the mime type used to save images. By default HEIC/HEIF images - * are converted to JPEGs. + * Enables filtering the mime type used to save images. By default JPEG images + * are converted to WebP and HEIC/HEIF images are converted to JPEGs. * * @see WP_Image_Editor::get_output_format() * @@ -6437,7 +6438,8 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) { * * @param string[] $output_format { * An array of mime type mappings. Maps a source mime type to a new - * destination mime type. By default maps HEIC/HEIF input to JPEG output. + * destination mime type. By default maps JPEG input to WebP output + * and HEIC/HEIF input to JPEG output. * * @type string ...$0 The new mime type. * }