How to Disable Large Image Scaling in WordPress

A graphic on a pale green patterned background showing a white document icon with a landscape image inside, surrounded by four green arrows pointing inward and a green X at the bottom, with the text Disable Image Scaling.

We may earn a referral fee at no additional cost to you when you shop through the links on this page.

Since WordPress 5.3, uploads larger than 2560 px on the long edge get a -scaled.jpg variant generated next to the original. This DevAnswers walkthrough shows how to turn that off, or raise the threshold, using the big_image_size_threshold filter.

What WordPress Does to Large Images 

WordPress 5.3 introduced a “BIG image” threshold in core: any uploaded image whose width or height exceeds 2560 pixels gets a scaled-down copy generated next to it. The Hook reference for big_image_size_threshold describes the behavior precisely: “If the original image width or height is above the threshold, it will be scaled down. The threshold is used as max width and max height. The scaled down image will be used as the largest available size, including the _wp_attached_file post meta value.”

On disk, that looks like this. A 4000 by 3000 px upload called portrait.jpg produces:

wp-content/uploads/2026/05/
portrait.jpg               # the ORIGINAL 4000x3000 (untouched)
portrait-scaled.jpg        # the SCALED variant, 2560x1920 (what 'Full' size points at)
portrait-1024x768.jpg      # standard thumbnail sizes (medium / large / etc)
portrait-300x225.jpg

The original is still on disk (WordPress never deletes it), but the Media Library’s “Full” size URL points at the -scaled variant rather than the original. Programmatically you reach the untouched file via wp_get_original_image_path( $attachment_id ), which the core docs describe as “always returns the path to the originally uploaded image file.” Visitors hitting your front end download the -scaled variant by default. WordPress added this in 2019 specifically to ease bandwidth and front-end performance on shared hosting where serving a 5+ MB uncompressed phone photo as a hero image is the kind of unintentional weight that tanks Core Web Vitals (the original stays on disk for archival or pre-processing access; only the served-to-visitors variant gets capped).

Prerequisites 

  • WordPress 5.3 or later (the filter was introduced in 5.3.0)
  • Edit access to your theme’s functions.php, OR a child theme, OR write access to wp-content/mu-plugins/
  • An image larger than 2560 px on the long edge (for verification)
  • If you also need to raise upload_max_filesize for huge originals, expect to bump PHP limits separately

Method 1: Disable Scaling Entirely 

The canonical pattern is a one-line filter that returns false. Per the Hook reference: “Returning false from the filter callback will disable the scaling.” If you’re adding to an existing functions.php, paste ONLY the add_filter() line below. The file already opens with its own <?php tag, and adding a second one will trigger a PHP parse error:

wp-content/themes/your-child-theme/functions.php
add_filter( 'big_image_size_threshold', '__return_false' );

If you’d rather not edit the theme (or you don’t have a child theme yet), drop the same snippet into a must-use plugin instead. The advantage: it survives theme switches and theme updates, and you don’t need a child theme just for this one tweak. Create a single PHP file under wp-content/mu-plugins/ (WordPress auto-creates that directory if it doesn’t exist on some hosts):

wp-content/mu-plugins/disable-big-image-scaling.php
<?php
/**
 * Plugin Name: Disable Big Image Scaling
 * Description: Keep originals at native resolution; no -scaled variants.
 */
add_filter( 'big_image_size_threshold', '__return_false' );

Either way the effect is identical: from the moment WordPress loads the filter, no new uploads get a -scaled variant generated, and the Media Library’s “Full” URL points at the untouched original.

Method 2: Raise the Threshold Instead 

Sometimes 2560 px is too aggressive but you still want SOME upper bound (so a careless 8000 px export doesn’t end up as the page’s “Full” image and tank performance). Instead of returning false, return an integer pixel value from a closure:

wp-content/mu-plugins/raise-image-threshold.php
<?php
/**
 * Plugin Name: Raise Big Image Threshold to 4000px
 */
add_filter( 'big_image_size_threshold', function() {
    return 4000;
} );

WordPress core defines the filter as $threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id ); so any integer you return becomes the new threshold. 4000 is a reasonable middle ground for design-portfolio sites that need detail but want a guardrail; 8000 effectively disables scaling for anything but enormous originals. The integer is in pixels and applies to whichever dimension (width or height) is larger.

Verify the Change 

The empirical check depends on which method you applied. For Method 1 (disable entirely): upload an image larger than 2560 px and the -scaled.jpg variant should be absent. For Method 2 (raise threshold): upload an image larger than 2560 but smaller than your new threshold and the -scaled.jpg should be absent; an image above your new threshold should still produce one. From your WordPress root directory (typically /var/www/html or whatever your hosting uses), inspect the uploads directory (replace test-image with your actual image basename):

Terminal
cd /var/www/html  # or your WP root
ls wp-content/uploads/$(date +%Y/%m)/ | grep test-image
  • Filter is working: you see test-image.jpg + standard thumbnails (300×225, 1024×768) but NO test-image-scaled.jpg
  • Default behavior (filter inactive): you see test-image.jpg AND test-image-scaled.jpg side by side

Cross-check in the Media Library: open the image, click “Copy URL to clipboard” under the Full size dropdown. For Method 1 (and for Method 2 images below the raised threshold) the URL points at the original filename. For Method 2 images larger than the raised threshold the URL still points at the -scaled variant, since raising the threshold keeps scaling for files above the new ceiling. If you’re seeing HTTP errors during upload before WordPress even gets to the scaling step, that’s usually nginx client_max_body_size or PHP upload_max_filesize blocking the upload entirely; see the linked nginx + WordPress upload guides below.

When to Keep the Default 

Disabling scaling is right for photography portfolios, design agencies, and any site where the Full-size image is a deliverable readers actually download. For most other sites the default 2560 px ceiling is a sensible safety net: it keeps page weight reasonable when a non-technical author drags a 6000 px phone photo straight into a post. The trade-off is concrete: a 2560 wide JPEG is typically 200-600 KB; the same image at 4000 wide is 800 KB to 2 MB. Multiply that by every Featured Image on every post and the bandwidth bill changes.

If image-heavy WordPress is your primary workload and you want the underlying server to handle the resulting CPU + RAM bursts during ImageMagick processing without manual tuning, Cloudways ships PHP-FPM and Imagick pre-tuned for media workloads on their managed WordPress stack. Imagick configuration matters even more once scaling is disabled: every upload now exercises the full original-resolution code path through PHP’s image library.

Conclusion 

One filter, two outcomes. Drop add_filter( 'big_image_size_threshold', '__return_false' ); into functions.php or an mu-plugin to keep every upload at its native resolution. Return a closure with an integer (4000, 8000) instead if you want a guardrail higher than the default. Verify by uploading an oversized image and looking for the absence (or presence) of -scaled.jpg next to the original. If you hit upload errors before the scaling kicks in, the HTTP Error on large file upload and nginx 413 client body size guides cover the upload-side plumbing. For the resource-monitoring side as Imagick chews through full-resolution originals, htop is your friend.

Support DevAnswers
Written, tested and maintained by one developer. Your support keeps these guides accurate and ad-light.
Buy me a coffee

Comments

Leave a reply