WordPress generates quite a few thumbnails by default (up to 7), so if you’re someone looking to stop WordPress from creating these on every upload, we’ll show you how to do it without any plugin.
Note: Disabling the thumbnails with these instructions applies only to new uploads. Old images will still have the already created thumbnails associated to them, so you will need to run a thumbnail regeneration using a plugin like reGenerate Thumbnails Advanced.
To disable the WordPress thumbnails automatically generated by default, you’ll need to add the following code snippets to your theme’s functions.php
file (excluding 3 of the sizes, which we’ll cover next).
Disable the Thumbnail size
The Thumbnail size is by default set to 150×150 in crop mode, which means the aspect ratio is not preserved, and you’ll always get a square 150×150 thumbnail. To stop generating this smallest size, simply go to Settings > Media and set both the height and width to 0, like this:

Disable the Medium size
The Medium size is by default set to a maximum of 300×300. It keeps the aspect ratio. To disable the Medium size, go again to Settings > Media and set both the Max Height and Max Width to 0, as shown in the screenshot above.
Disable the Large size
The Large size is by default set to a maximum of 1024×1024. It keeps the aspect ratio. The same applies to the Large size: go to Settings > Media and set both values to 0, also as shown in the screenshot.
Disable the Medium-Large size
The Medium-Large size is by default set to a maximum width of 768px. It also keeps the aspect ratio. In this case, there’s no menu or section to disable it. You’ll need to add this code to your functions.php
file:
function accelera_disable_medium_large_images($sizes) {
unset($sizes['medium_large']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'accelera_disable_medium_large_images');
Disable the 2x Medium-Large size
The 2x Medium-Large size is by default set to a maximum of 1536×1536, also keeping the aspect ratio. This can’t be disabled from any menu either. You’ll need to add this code to the functions.php
file:
function accelera_disable_2x_medium_large_images($sizes) {
unset($sizes['1536x1536']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'accelera_disable_2x_medium_large_images');
Disable the 2x Large size
The 2x Large size is by default set to a maximum of 2048×2048, and it also keeps the aspect ratio. To disable this thumbnail size, you also need to add the following code to functions.php
:
function accelera_disable_2x_large_images($sizes) {
unset($sizes['2048x2048']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'accelera_disable_2x_large_images');
Disable the -scaled
size
The so-called -scaled size is a relatively new feature that creates a new image size if the original image is larger than 2560px wide or tall. This new size will have the suffix -scaled
, hence the name. It will replace the original image every time you insert it into a post or page, although the original image will always remain in the file system.
If you want to disable the scaled size, simply add this smaller piece of code to the functions.php
:
add_filter('big_image_size_threshold', '__return_false');
Disabling all thumbnails generated by WordPress
What if you want to disable all the thumbnails (or image sizes) created by WordPress at once? You can combine the previous codes into one and place it in the functions.php
file as well.
// Disabling thumbnails
function disable_thumbnails_wordpress($sizes) {
unset($sizes['thumbnail']); // disable thumbnail
unset($sizes['medium']); // disable medium
unset($sizes['large']); // disable large
unset($sizes['medium_large']); // disable medium-large
unset($sizes['1536x1536']); // disable 2x medium-large
unset($sizes['2048x2048']); // disable 2x large
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'disable_thumbnails_wordpress');
add_filter('big_image_size_threshold', '__return_false'); // disable scaled size