From 09459f1e4b5eeb3604cfedfa12047ec03c7489b5 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Tue, 7 Jan 2025 22:51:51 +0000 Subject: [PATCH] Media: improve error messages for unsupported uploads. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve language explaining the reason for failure when uploading a modern image format like WebP or AVIF that the server doesn’t handle. Props adamsilverstein, Cybr. Fixes #61361. git-svn-id: https://develop.svn.wordpress.org/trunk@59590 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 6a5768a8a4..19813615bd 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -983,7 +983,7 @@ function wp_default_scripts( $scripts ) { /* translators: %s: File name. */ 'file_exceeds_size_limit' => __( '%s exceeds the maximum upload size for this site.' ), 'zero_byte_file' => __( 'This file is empty. Please try another.' ), - 'invalid_filetype' => __( 'Sorry, you are not allowed to upload this file type.' ), + 'invalid_filetype' => __( 'This file cannot be processed by the web server.' ), 'not_an_image' => __( 'This file is not an image. Please try another.' ), 'image_memory_exceeded' => __( 'Memory exceeded. Please try another smaller file.' ), 'image_dimensions_exceeded' => __( 'This is larger than the maximum size. Please try another.' ), @@ -1007,7 +1007,7 @@ function wp_default_scripts( $scripts ) { /* translators: %s: File name. */ 'error_uploading' => __( '“%s” has failed to upload.' ), 'unsupported_image' => __( 'This image cannot be displayed in a web browser. For best results convert it to JPEG before uploading.' ), - 'noneditable_image' => __( 'This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading.' ), + 'noneditable_image' => __( 'The web server cannot generate responsive image sizes for this image. Convert it to JPEG or PNG before uploading.' ), 'file_url_copied' => __( 'The file URL has been copied to your clipboard' ), );