Make WordPress Core

Changeset 46659


Ignore:
Timestamp:
11/05/2019 08:56:25 PM (5 years 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.
Merges [46658] to the 5.3 branch.
Fixes #48453.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-admin/includes/image.php

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