Looking for something?

How to disable image scaling in WordPress (a version 5.3 update)

Last week, WordPress released its 5.3 update and with it, they introduced a range of new features.

Within this update, they added a feature that forces large images to scale down in size so that they are “web-ready”. So if an image is larger than the default threshold (2560px) WordPress will automatically scale it down.

As I’m sure you already know, large images are problematic because they can impact on the loading time of a website, which in turn has a negative impact on SEO and user experience, and they take up a lot of space on the server.

Now, I do understand why WordPress has added this feature in. Many WordPress users upload images to their website directly from their camera or from a stock image website, and these images are often huge! However, there are times where we do want to upload large images to our WordPress websites, despite knowing that they will slow down our websites, and we don’t want WordPress to stop us from doing so.

Anyway, I found out how to easily remove this new image scaling functionality and I thought I’d share my knowledge with you just in case you are having problems uploading images to WordPress.

In this post, I’m going to show you how to stop WordPress scaling large images after the version 5.3 update.


1 | Open up your functions.php file

First things first, you need to open up the functions.php file for your theme. You can either do this using FTP or directly within the WordPress admin area.

To access the functions.php file via the WordPress admin area, hover over Appearance in the left-hand menu of WordPress and click on Theme Editor.

How to access the WordPress theme editor

If you can’t see the Theme Editor option, it may have been disabled either using a plugin (usually a security one), via the theme or via some code in your website files. You may need to contact a developer if you’re not sure how to access this.

Once you have the Theme Editor open, click on Theme Functions (function.php) on the right-hand side of the screen. This will open up the functions.php file.

How to edit the functions.php file

If you are using a pre-made WordPress theme and you aren’t already using a child theme, I highly recommend setting up one and editing the functions.php file of the child theme rather than the main/parent theme.

2 | Paste in this add_filter() function

Now that you have opened up your functions.php, all you need to do is paste in the following code at the bottom of the file:

add_filter( 'big_image_size_threshold', '__return_false' );

If you have a closing PHP tag (?>) then make sure this code goes before this, like so:

How to remove the image scaling functionality added in my WordPress 5.3

Then all you need to do is save your functions.php file (and upload it if you’re using FTP) and you’re done! You’ll now be able to upload larger images without WordPress forcing them to scale down in size.


Looking for more helpful advice?

Sign up to receive my free monthly newsletter!

On the last Friday of each month, I send out my monthly newsletter jam-packed with tips, tricks and resources to help you create and maintain the WordPress website of your dreams. And it’s completely free!

Simply enter your name and email below to sign up…


.

 

You can unsubscribe at any time by clicking the link in the footer of my emails, and I promise never to send you any spam. For more information check out my privacy policy here.



Comments

  1. Jamie says:

    Thanks for this, makes my the site look soooo much better ! – I wondered why the images all looked terrible until i noticed the sizes and that they were renamed ..

    🙁

    This was a great find !

    Thanks again !!

  2. Sander says:

    This problem is also driving me mad. Too bad this solution is not working for me.

    • Holly Pryce says:

      Hmmm, that’s odd that it’s not working? Is it definitely an issue with the images being scaled because they’re too large? The image URL will end in “-scaled” if this is the case?

  3. Tiff says:

    OMG lifesaver!

  4. Phil says:

    I was caught off guard when my images were scaled down after the WP update. Thanks for posting this!

  5. Matthew says:

    I’m a photographer, and on my site, sometimes it just makes sense to allow large images… especially since my audience is other photographers who likely have 4K monitors.

    This fix was very quick and helpful… thanks!

    – Matthew

Leave a comment

Comment

* = Required. Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.