How to disable the suffix “-scaled” which is being added at the end of each uploaded image?


I don’t know why, but now, WordPress is adding a suffix “-scaled” at the end of each newly uploaded image.

enter image description here

And, instead of keeping the original image link, it changes it to the “-scaled” version:

enter image description here

I found the culprit in /wp-admin/includes/image.php which has this:

        if ( ! is_wp_error( $resized ) ) {
            // Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg".
            // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality).
            $saved = $editor->save( $editor->generate_filename( 'scaled' ) );

How to get rid of this behavior?

, Rogerio Dec 3 years 2019-12-03T10:10:17-05:00 0 Answers 106 views 0

Leave an answer