WordPress automatically scales down any uploaded image whose width or height is over 2560 pixels, saves the smaller copy with -scaled in the filename, and serves that copy as the “full size” image. To stop it, add add_filter( 'big_image_size_threshold', '__return_false' ); to your site. Your original file is never deleted: it sits next to the scaled copy in the uploads folder.
The feature arrived in WordPress 5.3 (November 2019). This guide covers turning it off, raising the limit, exempting PNGs and GIFs, getting originals back for images you already uploaded, and the “suggested maximum size is 2560 pixels” upload error. I ran every snippet below in WordPress Playground on WordPress 7.1.4 (PHP 8.3, GD image library) with test uploads, and the results are in the quick-reference table.
- Since WordPress 5.3, any image wider or taller than 2560px is auto-scaled down and gets
-scaledadded to its filename. - The full-resolution original is still saved in your uploads folder; the scaled copy is what gets served.
wp_get_original_image_url()returns the original. - Disable scaling with the
big_image_size_thresholdfilter (returnfalse), raise the number, or exempt just PNG and GIF. Big animated GIFs are flattened when scaled, so exempting them matters. - Regenerating thumbnails does not un-scale existing uploads. Worse, regenerating with the filter already off erases the
original_imagerecord, so run the un-scale snippet below first. - “The server cannot process the image… suggested maximum size is 2560 pixels” is a memory or timeout failure while generating thumbnails, not the threshold.
WP_MAX_MEMORY_LIMITis the memory setting that applies.
What Is Large Image Scaling in WordPress?
Large image scaling is a built-in WordPress feature that automatically resizes any uploaded image with a longest edge over 2560 pixels. It was added in WordPress 5.3 “Kirk” as a response to the rise of phone cameras and DSLRs producing 4000-6000px+ photos that nobody actually needed at full size on a web page.
The mechanic is simple: if you upload a 6000×4000 photo, WordPress saves both the original file (untouched, full resolution) and a scaled version (2560×1707 in this case) with -scaled appended to the filename. From that point on, every WordPress function that references the “full size” image (post thumbnails, media library, theme templates) uses the scaled version instead of the original.
Why 2560? The 5.3 dev note that introduced the feature states the default without justifying it. For what it is worth, 2560 pixels is the width of a 1440p (QHD) monitor, so a scaled image can still fill one edge to edge, and it comfortably covers any normal content column at 2x pixel density. The check is “width or height above the threshold,” so a tall portrait shot triggers it just like a wide landscape one: a 1500×3000 test upload came back as 1280×2560. Core also allows a 1px rounding tolerance, so a 2561px image is left alone while a 2562px one gets scaled.
Two other things happen in the same pass, and both can rewrite your file even when the threshold never fires. If the photo carries an EXIF orientation flag (portrait shots from phones usually do), WordPress rotates the pixels to match and saves that as the new full size, with -rotated in the filename when no scaling was needed. And since WordPress 6.7, HEIC and HEIF files from iPhones are converted to JPEG on upload, on hosts whose image library can read them. So an upload can come back as photo-scaled.jpg, photo-rotated.jpg, or a JPEG that went in as HEIC, and all three are the same mechanism.
Where Does WordPress Save the Original (Unscaled) Image?
WordPress doesn’t delete your original file when it scales an image. Both versions live side by side in your uploads folder.
If you upload photo.jpg at 6000×4000, your uploads folder ends up with:
/wp-content/uploads/2026/05/photo.jpg: the untouched original/wp-content/uploads/2026/05/photo-scaled.jpg: the 2560px scaled version (this is what WordPress uses everywhere)- Plus the usual thumbnail sizes (
photo-150x150.jpg,photo-300x200.jpg, etc.)
If you need the original for a specific case (a print, a download, a high-DPI hero image), you can browse to the unsuffixed filename directly through FTP, your host’s file manager, or by stripping -scaled from any scaled URL. The media library just doesn’t link to it.
If you are working in code, you do not need to guess at filenames. wp_get_original_image_path() and wp_get_original_image_url() were added alongside the feature in 5.3 and return the unsuffixed file for any attachment ID, falling back to the normal file when the image was never scaled. The original filename is stored in the attachment metadata as original_image, and the REST API returns it as media_details.original_image while source_url points at the scaled copy. The featured image on our top 20,000 sites study is a live example: it was uploaded at 2752×1536, WordPress stored a 2560×1429 -scaled.jpg as the file it serves, and original_image still points at the untouched upload.
Should You Disable Large Image Scaling?
For most WordPress sites, no. Image scaling is a performance feature that protects the site from accidental 8MB hero images, and most visitors will never see the difference between a 2560px image and a 6000px one.
Disable it if you run a photography portfolio, a fine-art gallery, a stock-photo site, a print-on-demand store, or any site where the full-resolution image is the product. For these sites the scaled copy undercuts the thing you are selling.
Raise the threshold instead of disabling if you want a middle ground: keep the protection from accidental 20MB uploads, but allow images up to (say) 4000px or 5000px for legitimate high-resolution needs. This is the right pick for most sites that find 2560px restrictive.
Leave it alone on standard blogs, business sites, news sites, and ecommerce shops where the visual content is supporting (not primary) and page speed matters more than pixel-perfect resolution.
How to Disable Large Image Scaling in WordPress
Everything goes through one filter, big_image_size_threshold, which runs in wp_create_image_subsizes() in wp-admin/includes/image.php. Core casts whatever you return to an integer, and a result of 0 switches scaling off. That cast explains most of the rows below.
| Filter callback | What I got on WordPress 7.1.4 | Use it when |
|---|---|---|
| None (default) | 3000×2000 JPEG saved as a-scaled.jpg at 2560×1707; a.jpg kept | Most sites |
'__return_false' | 3000×2000 kept as uploaded, no -scaled file | Full resolution is the product |
'__return_zero' | Same as false (0 disables the check) | Never needed, but harmless |
return 4000; | 3000×2000 kept; 5000×3000 scaled to 4000×2400 | You want a higher ceiling, not none |
return '3000'; (string) | 4000×2000 scaled to 3000×1500, so strings work | Value comes from an option |
'__return_true' | 3000×2000 scaled to a 1×1 pixel -scaled.jpg (true becomes 1) | Never. This is the classic typo |
| PNG/GIF exemption (Method 3) | PNG and GIF kept at 3000×2000, JPEG still scaled to 2560 | Screenshots, diagrams, animated GIFs |
Method 3 without 10, 4 | ArgumentCountError fatal during upload | Never. Always pass the arg count |
Four ways to apply it, from the one-liner to the no-code option:
Method 1: Disable Entirely (One Line of PHP)
Add this code snippet to your site via the Code Snippets plugin, a custom plugin, or your theme’s functions.php file:
add_filter( 'big_image_size_threshold', '__return_false' );
This uses the big_image_size_threshold filter built into WordPress core. Returning false tells WordPress to skip the threshold check entirely, so every uploaded image keeps its original dimensions going forward.
Heads-up: this only affects uploads after the snippet is active. Images you uploaded before will stay scaled. See the section on existing uploads below, because regenerating thumbnails alone will not revert them.
One more thing this does not switch off: EXIF rotation. A portrait phone photo with an orientation flag still gets rotated and re-saved as photo-rotated.jpg, with the original kept alongside it exactly as with scaling. If -rotated shows up after you disable the threshold, that is why, and it is harmless.
Method 2: Raise the Threshold Instead of Disabling
If 2560px is too small but you don’t want to remove the protection entirely, raise the threshold to a higher number. Same filter, different return value:
add_filter( 'big_image_size_threshold', function() {
return 4000;
});
Replace 4000 with whatever maximum longest-edge value makes sense for your site. Common choices:
- 3840 is the exact 4K display width, good for sites with hero images displayed at very large sizes
- 4000 to 5000 is comfortable for photography portfolios that still want some upper bound
- 6000 to 8000 is effectively unlimited for any current camera, while still catching the occasional 20000px scan
This is the option most sites should pick if 2560px feels too aggressive: reasonable high-resolution uploads go through untouched, and a stray 100MP image still gets cut down.
Method 3: Exempt Specific Formats (PNG, GIF) Instead of Disabling
Often the images you actually want left alone are a specific type. Screenshots, diagrams and UI mockups are usually PNG, and resampling them softens text and hairlines in a way photos never show. Animated GIFs are the bigger casualty: WordPress’s image editors only ever work on the first frame, so a GIF over 2560px comes back as a single static image. The filter receives the attachment ID, so you can skip the check for the formats that matter and keep it for everything else:
add_filter( 'big_image_size_threshold', function ( $threshold, $imagesize, $file, $attachment_id ) {
$skip = array( 'image/png', 'image/gif' );
if ( in_array( get_post_mime_type( $attachment_id ), $skip, true ) ) {
return false;
}
return $threshold;
}, 10, 4 );
JPEGs and WebP files still get scaled at 2560px; PNGs and GIFs upload at whatever size they came in (their thumbnails have always been static, this keeps the full-size one moving). Edit the $skip array to taste. The 10, 4 at the end is not optional: without the 4, WordPress passes only the first argument and PHP 8 throws an ArgumentCountError, which kills the upload.
If you only care about one format, the second argument already carries the MIME type, so you can skip the database lookup. This version exempts PNGs and behaved the same in testing:
add_filter( 'big_image_size_threshold', function ( $threshold, $imagesize ) {
return 'image/png' === $imagesize['mime'] ? false : $threshold;
}, 10, 2 );
Method 4: Disable via Plugin (No Code)
If you’d rather not touch any code, the Disable Media Sizes plugin by Jeff Starr does it from a settings screen. Install it, open its settings, and turn on the Disable Big/Scaled Size option. Like the filter, it only affects new uploads.
The same plugin can switch off the other built-in sizes (thumbnail, medium, large, 768, 1536 and 2048) if you only ever use one or two of them.
How to Update Already-Uploaded Images
Any of the methods above only affect future uploads. Existing images stay scaled, and regenerating thumbnails does not un-scale them.
Both wp media regenerate and the Regenerate Thumbnails plugin look up the original with wp_get_original_image_path() and pass it to wp_generate_attachment_metadata(). What happens next depends on the filter:
- With scaling still on, core scales the original again and you end up exactly where you started.
- With scaling off, core builds fresh metadata that says 3000×2000 and drops the
original_imageentry, but never updates the stored file path (_wp_attached_file). In my test the full-size URL kept pointing atm-scaled.jpgwhile WordPress reported it as 3000×2000, andwp_get_original_image_path()now returned the scaled file.
That second case is the trap: regenerate first and the record of which file was the original is gone. Automattic’s own tracker for the plugin has an open report on exactly this.
To genuinely revert existing uploads, either re-upload them with the filter active, or run the snippet below before any regeneration.
Option A: Point attachments back at the original, then regenerate
Save this as unscale.php and run it once with WP-CLI via wp eval-file unscale.php, after your threshold filter is in place. It only touches attachments that were actually scaled:
// Run once, with the threshold filter already disabled.
// Points each scaled attachment back at its original file.
$ids = get_posts( array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_status' => 'inherit',
'posts_per_page' => -1,
'fields' => 'ids',
) );
foreach ( $ids as $id ) {
$file = get_attached_file( $id );
$meta = wp_get_attachment_metadata( $id );
if ( ! empty( $meta['original_image'] ) ) {
$original = wp_get_original_image_path( $id );
} elseif ( $file && preg_match( '/-scaled(\.[a-z0-9]+)$/i', $file ) ) {
// original_image was lost (thumbnails regenerated with the filter off).
$original = preg_replace( '/-scaled(\.[a-z0-9]+)$/i', '$1', $file );
} else {
continue; // never scaled
}
if ( $original && $original !== $file && file_exists( $original ) ) {
update_attached_file( $id, $original );
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $original ) );
}
}
For every scaled image, it sets the served file back to the original, then rebuilds metadata and sizes from it. The elseif branch rescues attachments that were already regenerated with the filter off, by stripping -scaled from the stored filename and checking the original exists. I tested both paths: a normally scaled upload and a “regenerated too early” one both came back as 3000×2000 originals with all six default sizes rebuilt. The old -scaled.jpg files stay on disk, so hard-coded links to them keep working. On a large library, run it in a screen session, because it processes every image in one go.
Prefer not to run code? Re-uploading the affected images does the same job one at a time. Either way, take a backup first.
Option B: Regenerate thumbnails only
If all you want is thumbnails rebuilt from the original file, and you are keeping the 2560px scaling, the standard tools do that safely:
wp media regenerate --yes
Or, without shell access, the Regenerate Thumbnails plugin from Tools > Regenerate Thumbnails. Just don’t run either with the threshold disabled until Option A has finished, for the reason above. On a large site, run WP-CLI in a screen session or schedule it for a quiet hour.
“The server cannot process the image” error: what it actually means
If you landed here because an upload failed with “The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels,” the 2560 in that sentence is a red herring. It is fixed text in WordPress’s uploader script, not a reading of your threshold setting, and changing big_image_size_threshold will not make the message go away.
Here is what happened. Since 5.3, WordPress uploads the file and creates the attachment first, then generates the scaled copy and every thumbnail size in a second request. If that second step dies (typically a PHP memory or execution-time limit, which surfaces as a 500 or 504), the uploader retries it up to five more times, resuming from whichever sizes are still missing. Only when every retry fails does it delete the attachment it just created and show you this message. The same message also appears when the initial request dies before WordPress can record the attachment at all, for the same underlying reason. Either way the file was fine; your server ran out of room while resizing it.
Why big images run out of room: the image library has to unpack the whole picture into memory, at a minimum of four bytes per pixel, regardless of how small the file on disk is. A 6000×4000 photo needs at least 96 MB just to open, before a single thumbnail is made, and a heavily compressed 2 MB JPEG needs the same RAM as a 20 MB one if the pixel count matches.
The fixes, in the order to try them:
- Raise the memory ceiling that image processing actually uses. For image work WordPress raises itself to
WP_MAX_MEMORY_LIMIT, which defaults to 256 MB (or PHP’s own limit if that is already higher), so the usual advice to increaseWP_MEMORY_LIMITonly helps if you push it past 256 MB. Adddefine( 'WP_MAX_MEMORY_LIMIT', '512M' );towp-config.php, and make sure PHP’s ownmemory_limitallows it, which may mean a host ticket. Our guide to increasing the PHP memory limit covers the php.ini and .htaccess side. - Give the request more time. PHP’s default 30 second
max_execution_timeis tight for a 40-megapixel PNG on shared hosting. - Generate fewer sizes. Every registered image size is another resize pass over the same big bitmap; the Disable Media Sizes plugin from Method 4 trims the list.
- Check which image library is in use under Tools > Site Health > Info > Media Handling. If neither GD nor ImageMagick is available, nothing can be resized at all and the fix is a host ticket.
- Upload a smaller version. Resizing to 2560px on your own computer first is the pragmatic fix when you do not control the server, and it is exactly what the message is hinting at. If a smaller file still fails, size is no longer the cause, and our guide to fixing WordPress image uploads covers file formats, folder permissions and plugin conflicts.
Is this the same as “Serve scaled images” in PageSpeed or GTmetrix?
No, and the two get confused a lot. “Serve scaled images” was the name of the PageSpeed rule in GTmetrix’s legacy reports; GTmetrix’s own migration notes say it is now the Lighthouse audit Properly size images. That audit fails an image when the file is at least 4 KiB bigger than it needs to be for the size it is displayed at.
WordPress’s 2560px scaling only helps with that at the extreme end. A 2560px image in an 800px content column still fails the audit. What fixes it in WordPress:
- Let core’s
srcsetdo its job. Images in post content getsrcsetandsizesattributes added automatically (since WordPress 4.4), so the browser picks a smaller generated size. - Make your theme ask for a registered size such as
largeormedium_largeinstead offull. Our WordPress featured image size guide shows how to find which size a theme is using. - Watch out for hero blocks, sliders and lightboxes that load the full-size file. If you disabled scaling, “full” can now mean a 6000px photo.
- Compress on upload with an image optimization plugin (ShortPixel, Optimole and EWWW all do this regardless of the scaling setting).
So disabling large image scaling can make this audit worse, not better, if your theme uses full-size images anywhere. For the loading side of the same problem, see how WordPress lazy loading works and how to control it.
Frequently Asked Questions
How do I stop WordPress from scaling images?
Add add_filter( 'big_image_size_threshold', '__return_false' ); with a code snippets plugin or your theme’s functions.php, or turn on “Disable Big/Scaled Size” in the free Disable Media Sizes plugin. Both only affect images uploaded afterwards. To raise the limit instead of removing it, return a number such as 4000.
What does -scaled.jpg mean in WordPress?
The -scaled suffix means your upload was wider or taller than 2560px, so WordPress saved a copy with its longest edge at exactly 2560px and uses that copy as the “full size” image in posts, themes and the media library. The original file is still in the same folder, without the suffix.
Why is WordPress scaling my images?
Since WordPress 5.3, every uploaded image with a width or height over 2560px is scaled down on upload to keep page weight reasonable when people upload straight-from-camera photos. The 2560 is the default value of the big_image_size_threshold filter, so you can raise it, lower it, or switch it off.
Where does WordPress store the original unscaled image?
In the same folder as the scaled version, under the original filename. If the scaled image is /wp-content/uploads/2026/05/photo-scaled.jpg, the original is /wp-content/uploads/2026/05/photo.jpg. In code, wp_get_original_image_path() and wp_get_original_image_url() return it.
How do I get the original full-size image back?
For future uploads, disable or raise the threshold. For images already in your library, run the un-scale snippet in the section on existing uploads (or re-upload them). Regenerating thumbnails alone will not switch the served full size back, and doing it with the filter off first loses the original_image record.
Does WordPress scaling apply to PNG and GIF files?
Yes. Core has no format exemption: JPEG, PNG, GIF, WebP and AVIF all go through the same check, and my 3000×2000 PNG and GIF test uploads both came back as 2560×1707 -scaled files. Animated GIFs lose their animation, because both image editors only work on the first frame. Use the exemption snippet in Method 3 to skip them. SVGs are never scaled, and HEIC uploads are converted to JPEG first (since WordPress 6.7) and then scaled.
Does the “suggested maximum size is 2560 pixels” error mean I need to change the threshold?
No. That sentence is hard-coded in the uploader and appears when the server runs out of memory or time while generating image sizes, after WordPress has retried five times. Raise WP_MAX_MEMORY_LIMIT, give PHP more execution time, or upload a smaller file.
Wrapping Up
For most sites, large image scaling is worth leaving on. For photography, art and print sites, the one-line filter (or the PNG/GIF exemption, or the plugin) handles new uploads, and the un-scale snippet handles old ones, as long as you run it before regenerating thumbnails. And if you went looking for an original you assumed WordPress deleted: it is still in your uploads folder under the unsuffixed filename.
While you’re optimizing image behavior, our guide on how to increase the WordPress upload size limit covers the other half of the upload story (the size limit itself), and how to speed up WordPress covers the broader performance picture.



12 Responses
Thanks Andy. It helped me
So happy to help!
Hey Andy, I was able to use this to get some of my larger images loaded on to site that it was not letting me load. in order to restore this setting back to default would I be able to change this to true instead of false?
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );
change to
add_filter( ‘big_image_size_threshold’, ‘__return_true’ );
I use the Code Snippets program to put all my WP function changes in. Therefore, I do not have to mess with the templates or deal with making a child theme or wanting to change themes and having to move code around. That program also has a clickable switch to turn the individual function on or off. I am not affiliated with them, but it is a pretty neat plugin.
Thank you very much
Worked perfect
Thanks for this. I was uploading small Webp images to my site and WP was scaling them 3 times larger. This code did the trick. I am not sure why WP does not have a switch built in to turn scaling off for the non-noobs that understand image sizing? This sort of goes against the idea of using less bandwidth and making websites faster.
This snippet fixes this issue for me: Some of my images got bigger (in file size) when WordPress scales them. Strange WP would do that.
Thanks, this worked fine for my site. Kudos
the code snippet fixed my problem thanks
This allows me to upload at any size, but not to display. Images are not displayed at a greater size than 1536px on the long side. Very annoying.
Likely your theme has a resized image when it’s displayed, this only removes the WordPress max image size rather than theme scaling.
thnk you bro