WordPress.org

Make WordPress Core

Ticket #48304: 48304.diff

File 48304.diff, 902 bytes (added by kraftbj, 2 years ago)
  • src/wp-admin/includes/image.php

    diff --git src/wp-admin/includes/image.php src/wp-admin/includes/image.php
    index 53d9043402..6c98bef2b3 100644
    function wp_create_image_subsizes( $file, $attachment_id ) { 
    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".
    267                         // 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 ) );
     266                        // The resized image will have a filename akin to other media sizes in WordPress with a width[x]height suffic.
     267                        $saved = $editor->save( $editor->generate_filename() );
    269268
    270269                        if ( ! is_wp_error( $saved ) ) {
    271270                                $image_meta = _wp_image_meta_replace_original( $saved, $file, $image_meta, $attachment_id );