WordPress.org

Make WordPress Core

Changeset 46658 for trunk


Ignore:
Timestamp:
11/05/2019 08:51:12 PM (20 months ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

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

    r46651 r46658  
    277277
    278278        if ( ! is_wp_error( $resized ) ) {
    279             // Append the threshold size to the image file name. It will look like "my-image-scaled-2560.jpg".
     279            // Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg".
    280280            // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality).
    281             $saved = $editor->save( $editor->generate_filename( 'scaled-' . $threshold ) );
     281            $saved = $editor->save( $editor->generate_filename( 'scaled' ) );
    282282
    283283            if ( ! is_wp_error( $saved ) ) {
Note: See TracChangeset for help on using the changeset viewer.