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:


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

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;
  • it's 4 years ago but how can i only use add_filter if the upload comes from a specific plugin? – alex Apr 5 '16 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 '16 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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