To stop WordPress generating intermediate image files for new uploads, use the intermediate_image_sizes_advanced filter. Return an empty array to suppress every size handled by that filter, or remove only selected sizes to preserve ones your theme or plugins need. WordPress’s separate large-image scaling feature uses big_image_size_threshold; changing that filter does not stop intermediate-size generation.
Choose which image behavior to change
WordPress generates intermediate files from the image sizes registered when it creates attachment metadata. The right control depends on what you want to prevent:
- Stop intermediate sizes: filter
intermediate_image_sizes_advanced. This affects the set of sizes WordPress is about to generate. - Stop large-image scaling: filter
big_image_size_threshold. WordPress documents a default threshold of 2560 pixels for the maximum width and height; returningfalsedisables this scaling behavior. It does not disable thumbnail or other intermediate sizes.
Disable all intermediate sizes for new uploads
Add this PHP filter in a site-specific plugin or the active theme’s setup code, where WordPress loads filters:
add_filter(
'intermediate_image_sizes_advanced',
'__return_empty_array'
);
This returns an empty list of sizes for the filter to process. It is a broad change: layouts, featured-image templates, or plugins may expect particular image sizes and can display images differently if those files are not created.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
Keep needed sizes and remove only the rest
If the site relies on some registered sizes, use a callback to remove only the entries you do not want. The filter receives an associative array of sizes WordPress is about to generate; change that array and return it.
add_filter( 'intermediate_image_sizes_advanced', function ( $sizes ) {
unset( $sizes['medium_large'] ); // Example: remove one registered size.
return $sizes;
} );
Use the actual array key registered on your site. Core, themes, and plugins can all register image sizes; custom sizes are commonly added with add_image_size(). Inspect the site’s registrations and check theme templates, featured images, and plugin requirements before removing an entry.
Disable large-image scaling separately
WordPress’s large-image scaling is not the same as generating intermediate sizes. The big_image_size_threshold filter controls whether an image exceeding the threshold is scaled down; the documented default is 2560 pixels, applied to the maximum width and height. To disable that scaling:
add_filter( 'big_image_size_threshold', '__return_false' );
Use this only if you want to retain the original dimensions instead of WordPress’s large-image -scaled behavior. Leave the intermediate-size filter in place or configure it separately if you also want to change thumbnail and other generated sizes.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
Understand what happens to existing media
These filters govern generation; they do not clean up files already created. Removing a size registration does not automatically delete its existing generated files, and regenerating attachment metadata does not check for and remove every intermediate file previously created for that image. Treat cleanup as a separate maintenance task: back up the media library and verify that no posts, theme components, or plugins reference the files before deleting them.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Test the upload workflow used on your site
Do not assume every upload follows the same server-side hook sequence. In the Block Editor’s documented client-side processing flow, wp_generate_attachment_metadata can run with context create and again with context update after a finalize request. Client-side processing uses size filters even though some server-side image hooks do not fire. Test with the site’s WordPress version, editor, theme, and plugins, then confirm both that unwanted files are no longer created and that displayed images still work.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




