How to disable Theme Image Sizes

Different layouts require different image sizes, so our themes might generate image sizes that are unneeded for your particular need. There are couple of methods you can disable these image sizes easily.

Use a filter

You can use the below filter to unset the image sizes inside $image_sizes array.

add_filter("thb_image_sizes_filter", function($image_sizes) {
    // use your PHP code to alter sizes inside $image_sizes;
    return $image_sizes;
});

Use a plugin

You can use the “Stop Generating Image Sizes” plugin to easily un-check any unneeded image size.

Was this article helpful?

Related Articles