Make WordPress Core

Ticket #48304: 48304.2.diff

File 48304.2.diff, 886 bytes (added by azaozz, 5 years ago)
  • src/wp-admin/includes/image.php

     
    263263                }
    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 ) ) {
    271271                                $image_meta = _wp_image_meta_replace_original( $saved, $file, $image_meta, $attachment_id );