Sep 07, 2025  

Whenever you upload an image to the media library, WordPress automatically creates from 3 to 6 versions.
There are a number of plugins like Disable Generate Thumbnails that can prevent these from creating.
However, a simple setting in dashboard and an additional code in your theme’s functions.php can do so efficiently.

The sizes created are:
– Thumbnail size [150×150]
– Medium size [300×300]
– Large size [1024×1024]
– Medium-Large size [768]
– 2x Medium-Large size [1536×1536]
– 2x Large size [2048×2048]
– Scaled size [original image bigger than 2560px]

Disabling from WordPress Dashboard.

Under Settings > Media:
• set all or just those you wish to disable to 0.
This will disable the basic, then add the code for more in your theme file.

Disabling via code in functions.php

Disabling the scaled size

<?php add_filter('big_image_size_threshold', '__return_false'); ?>

Disabling all thumbnails generated by WordPress
This is the complete code, that will disable all plus the scaled size

<?php
// Disable all thumbnails in WP
add_action('intermediate_image_sizes_advanced', 'disable_image_sizes');
function disable_image_sizes($sizes) {
//unset($sizes['thumbnail']);
//unset($sizes['medium']);
//unset($sizes['large']);
unset($sizes['medium_large']);
unset($sizes['1536x1536']);
unset($sizes['2048x2048']);
return $sizes;
}
add_filter('big_image_size_threshold', '__return_false');
?>

Easy right?