How to Disable WordPress Image Scaling
Table of Contents
Reading Time: 2 min, 20 sec
When you upload an image to WordPress, the system does not always keep it in the same size. Starting from WordPress 5.3, there is a feature called image scaling. This feature automatically creates a smaller version of very large images that you upload. The goal is to make your website faster and more efficient.
What Is Image Scaling in WordPress?
Image scaling is the process of resizing large images to a maximum width or height of 2560 pixels. If you upload an image larger than this, WordPress saves a scaled version and uses it on your site. The scaled image gets a -scaled suffix in the file name. For example, myphoto.jpg becomes myphoto-scaled.jpg.
Best WordPress Hosting
Bluehost is one of the best and secure WordPress hosting providerThe original full-size image is still stored on your server, but WordPress will load the scaled version by default.
Why Does WordPress Use Image Scaling?
WordPress introduced this feature to solve common problems caused by very large images:
- Large images slow down websites and hurt loading speed.
- High-resolution photos take more storage space on your hosting.
- Many users upload photos directly from smartphones or cameras, which can be extremely large.
By scaling images, WordPress makes sure your site loads faster and performs better without you having to manually resize files.
When Is Image Scaling Irrelevant?
Image scaling is not useful in every case. Some website owners may not want WordPress to scale their images. For example:
- Photographers or designers who need to display images in full resolution.
- Print shops or websites that allow users to download original high-quality files.
- Portfolio sites where image quality is more important than speed.
In these cases, the scaled version may not serve the purpose, and using the original file is necessary.
How to Disable Image Scaling in WordPress
If you do not want WordPress to automatically scale your images, you can disable this feature by adding a filter to your theme’s functions.php file or a site-specific plugin.
Here is the code:
add_filter( 'big_image_size_threshold', '__return_false' );
This small snippet tells WordPress not to create scaled versions. From now on, your uploads will keep their original size.
If you only want to change the maximum limit instead of disabling it completely, you can do this:
add_filter( 'big_image_size_threshold', function() {
return 4000; // set your custom maximum size
} );
In the above example, WordPress will allow images up to 4000px before scaling.
Final Words
Image scaling in WordPress is a useful feature for most websites because it improves performance and saves space. However, if you run a site where high-resolution images are a must, you may want to disable it. With a small code snippet, you can easily turn off this feature or set your own size limit.