Make WordPress Core

Changeset 46565


Ignore:
Timestamp:
10/21/2019 09:41:09 PM (5 years ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r46507 r46565  
    264264
    265265        if ( ! is_wp_error( $resized ) ) {
    266             // Append the threshold size to the image file name. It will look like "my-image-2560.jpg".
     266            // Append the threshold size to the image file name. It will look like "my-image-scaled-2560.jpg".
    267267            // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality).
    268             $saved = $editor->save( $editor->generate_filename( $threshold ) );
     268            $saved = $editor->save( $editor->generate_filename( 'scaled-' . $threshold ) );
    269269
    270270            if ( ! is_wp_error( $saved ) ) {
Note: See TracChangeset for help on using the changeset viewer.