Media/Upload: When the users upload big images and WordPress creates a scaled image to use as the largest size, append `scaled-` to the file names of the scaled images to make them easier to recognize.
Props kraftbj, azaozz. Fixes #48304. Built from https://develop.svn.wordpress.org/trunk@46565 git-svn-id: http://core.svn.wordpress.org/trunk@46362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
654c413990
commit
e1560cd1e0
|
@ -263,9 +263,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-2560.jpg".
|
||||
// Append the threshold size to the image file name. It will look like "my-image-scaled-2560.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( $threshold ) );
|
||||
$saved = $editor->save( $editor->generate_filename( 'scaled-' . $threshold ) );
|
||||
|
||||
if ( ! is_wp_error( $saved ) ) {
|
||||
$image_meta = _wp_image_meta_replace_original( $saved, $file, $image_meta, $attachment_id );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-RC1-46564';
|
||||
$wp_version = '5.3-RC1-46565';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue