Are you having problems with WordPress automatically scaling your images and adding the word "scaled" to your image names?
Since WordPress 5.3, this has been an automatic process within the CMS and is intended to ensure that no images that are too large are uploaded. In this article, I'll show you how to disable the image scaling feature.
Why the image scaling function exists in the first place
WordPress is one of the most popular content management systems in the world. Its widespread use and ease of use quickly led to the creation of many websites and blogs, which, of course, uploaded large images without giving much thought to performance.
However, images are cropped within WordPress as soon as they are uploaded, and the size normally displayed on a website ranges between 200 pixels and 1400 pixels. In order to save server storage space and stop the unnecessary uploading of large images, WordPress 5.3 decided to automatically reduce all images larger than 2560 pixels to this standard threshold. After uploading, these images then include the suffix "scaled" in the file name.
The idea behind it is not bad in principle and is unlikely to really bother most WordPress users.
However, if you sell photographs via your WordPress website or attach great importance to the name of the image file, the automatic reduction in size and the addition of "scaled" may be very disruptive.
How to disable automatic scaling of your images
In the following instructions, I will briefly show you how you can use a small code snippet to disable automatic scaling and the addition of "scaled" in the image file. Please note that incorrect execution can cause problems with your WordPress site. It is best to have a backup or even a test environment ready.
Install the "Code Snippets" plugin
When it comes to adding code within the functions.php file in the theme, I like to use the free WordPress plugin "Code Snippets." Not only do I have a better overview of all the customizations, but they also remain active when I switch themes.
If you're thinking, "Not another plugin!" you can rest assured, because Code Snippets is lightweight and has been around for years.
You can either download the plugin from the WordPress.org website and upload it via SFTP, or search for it via the menu item "Plugins -> Install" and install it that way.

Adding code functions within code snippets
After installing and activating the plugin, you will find a new menu item called "Snippets" in the navigation bar on the left side of your WordPress dashboard.
Select this and create your first snippet directly by clicking on "Add New."
Give it a simple but clear name, such as: Disable automatic scaling. If that's not enough, you can add more information in the description at the bottom. That way, you'll always know what the snippet is used for.
Now paste the following text into the code editor:
add_filter( 'big_image_size_threshold', '__return_false' );

Select the "Only run in administration area" option below the code editor. With this code, it is also possible to have "Run snipped everywhere" activated, but execution within the admin area is most important, as 90% of images are uploaded there.
Save and activate your newly created snippet. If no error messages appear (which should not be the case), you can try uploading a large image. Then check the size and file name in the media library.
Conclusion
Thanks to WordPress 5.3, uploading image files that are too large is now almost impossible. This frees up storage space and speeds up websites. However, this default setting is unfortunately not ideal for all WordPress users. By simply adding a line of code, you can ensure that not only is the automatic scaling of images deactivated, but also that the suffix "scaled" is no longer added to the file name of the image.






