prevent wordpress from creating thumbnails of an image

I have a theme installed which automatically generates differnet sizes of images (thumbnails) when I add a “featured” image in a post.

supermuc-106×80.jpg
supermuc-116×80.jpg
supermuc-150×100.jpg
supermuc-150×150.jpg
supermuc-290×180.jpg
supermuc-300×174.jpg
supermuc-600×250.jpg
supermuc-600×400.jpg
supermuc-905×500.jpg
supermuc.jpg

Read More

Thats OK so far.
My problem is when I want to add some more pictures/photos inside the post it also creates differnet sizes of the picture but actually this is not “featured” image so all those sizes are just wasting my disk space.

Is there any way or plugin to allow me select which thumbnails will be generated when I upload an image? So I can “disable” all sizes I dont want to be created and save disk space?

Related posts

Leave a Reply

3 comments

  1. The plugin

    As an alternative to @mrwweb answer, I can recommend my plugin »Dynamic Image Resize«, which is not hosted in the official repository – Disclaimer: it’s free and it’s not a fork of ottos plugin.

    How it works:

    There’s a Shortcode to make things easy:

    Place [dynamic_image] in your content. The shortcode has four arguments:

    • src Full path to the image in your upload directory or the ID
    • width Integer value
    • height Integer value
    • classes Css classes – separated by a space

    There’s also a template tag, that you can use in your theme.

    // The args need to be an array
    dynamic_image_resize( array(
         // The full path to the image in your uploads folder
         'src'     => 'http://example.com/wp-content/uploads/2012/03/some_image.png'
         // OR: the ID
         'src'     => 6
    
        ,'width'   => 60
        ,'height'  => 100
        ,'classes' => 'some classes to align and style the image'
    ) );
    

    Disable default sizes

    Simply go to

    Admin UI/backend » Settings » Media

    then add 0 as height/width for sizes that you don’t need. This disables the generation of this size.

  2. If your theme is using WordPress Feature Image then you should check functions.php there you could find something similar to the code below

    add_image_size( 'homepage-thumb', 220, 180, true ); 
    

    The term homepage-thumb could be different. You can remove/comment out the code which calls for different image sizes that you think are not required.