How to Prevent WordPress from Creating Thumbnails

Every time you upload an image to a WordPress-powered website, WordPress creates four copies of the same image by default. These copies are of different sizes: thumbnail, medium, medium_large and large. While these image sizes are useful in some ways, when they add up together they can bloat the size of your website. Here are two ways to stop WordPress from automatically generating those images.

Method 1 – Make changes to the Media Settings

Go to Settings > Media in the WordPress dashboard and set all the values for Width and Height for all the image sizes to zero, as shown in the image below.

WordPress Media Settings

Method 2 – Add code to the functions.php file

Open the functions.php file and add in the following lines of code:

// Stop WordPress from Creating Thumbnails
function wp_custom_image_sizes($sizes) {
    unset( $sizes['thumbnail']);
    unset( $sizes['medium']);
    unset( $sizes['medium_large']);
    unset( $sizes['large']);
    unset( $sizes['full'] );

    $wpimgsizes = array(
        'full-size' => __( 'Full Size' )
    if( !empty($sizes) )
        return array_merge($sizes, $wpimgsizes);
        return $wpimgsizes;
add_filter('intermediate_image_sizes_advanced', 'wp_custom_image_sizes');
add_image_size( 'full-size', 99999, 99999, false );