WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want wordpress to stop making multiple size images cause it's going to eat up my storage space. So I went Settings > Media and then set all the sizes to 0. When I uploaded a new image it still is making 2 copies for example:

achannel.jpg
achannel-346x288.jpg

although they are both full size images so why does it need to create another full size image?

share|improve this question
up vote 4 down vote accepted
add_filter('intermediate_image_sizes_advanced', 'filter_image_sizes');
function filter_image_sizes( $sizes) {

    unset( $sizes['thumbnail']);
    unset( $sizes['medium']);
    unset( $sizes['large']);

    return $sizes;
}
share|improve this answer
    
it's 4 years ago but how can i only use add_filter if the upload comes from a specific plugin? – alex Apr 5 at 10:23
1  
Preferably, you should use one of the filters from the plugin. If the plugin doesn't have one, then, depending on the plugin, maybe you might be able to use an if condition inside the function to check for the plugin. – Mridul Aggarwal Apr 5 at 11:39

Built in

Just set the sizes you don't need to 0. This skips the process of creating them. I know, it's not documented, but it works.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.