How to Stop WordPress from Auto-Scaling Images on Upload
Please Subscribe to our YouTube Channel
WordPress keeps testing new features to improve users’ experience, but sometimes they bring features that are kind of quite annoying.
Do You Really Want WordPress to Scale Image Automatically When You Upload of Large or High-Resolution Image?
There are many great ways to compress images, but scaling the image’s resolution itself on upload is kind of a nonsense feature. Being a blogger, you need to learn how to resize manually and compress before uploading rather than allowing WordPress to make your image like the way they want.
Wait! WordPress Actually thinks that you can Edit Function.php file manually and can’t resize the image?
Yes, that’s true and that’s why they have mentioned the method to add filter within function.php file to prevent the auto-scaling of uploaded images.
Is there any risk involved if I want to Edit the function.php file?
Many WordPress sites may break if you try to Add function.php file. Another way around is to create a child theme manually for this purpose only.
How to Disable Auto-Scaling my Uploaded Images in WordPress 5.3 or Above
Method 1 – (if you are sure you want to Edit function.php file)
add_filter( 'big_image_size_threshold', '__return_false' );
Method 2 – Using Plugin – Safe Way
- Add a new free plugin “My Custom Functions”
- Install it and activate it
- Click on Settings option under WordPress Dashboard and then select PHP Inserter option
- Ad the following code
add_filter( 'big_image_size_threshold', '__return_false' );
- Make sure you turn on the switch and hit the Save Changes option as shown in the screenshot above.
If you have followed the instruction properly, it should not resize the image automatically now when you upload.