From f9e81c83d5a0df25e067f7574867ca3acba82c61 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 5 Nov 2019 20:53:03 +0000 Subject: [PATCH] Media: Remove the variable number (from the big image threshold value) when generating file names for scaled images. This makes it easier to "calculate" the full size file name from the name of an intermediate size image. Props ianmjones, azaozz. Fixes #48453 for trunk. Built from https://develop.svn.wordpress.org/trunk@46658 git-svn-id: http://core.svn.wordpress.org/trunk@46458 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/image.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index ca96e47ce1..767f754a34 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -276,9 +276,9 @@ function wp_create_image_subsizes( $file, $attachment_id ) { } if ( ! is_wp_error( $resized ) ) { - // Append the threshold size to the image file name. It will look like "my-image-scaled-2560.jpg". + // Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg". // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality). - $saved = $editor->save( $editor->generate_filename( 'scaled-' . $threshold ) ); + $saved = $editor->save( $editor->generate_filename( 'scaled' ) ); if ( ! is_wp_error( $saved ) ) { $image_meta = _wp_image_meta_replace_original( $saved, $file, $image_meta, $attachment_id ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8365d675e0..0e4598ca77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46657'; +$wp_version = '5.4-alpha-46658'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.