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.
Merges [46658] to the 5.3 branch.
Fixes #48453.
Built from https://develop.svn.wordpress.org/branches/5.3@46659


git-svn-id: http://core.svn.wordpress.org/branches/5.3@46459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-11-05 20:58:02 +00:00
parent 9ef78246d8
commit 1d815800d4
2 changed files with 3 additions and 3 deletions

View File

@ -271,9 +271,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 );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-RC3-46655';
$wp_version = '5.3-RC3-46659';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.