How to Deregister Thumbnail Sizes and Lower the “Resize Larger Images” Setting

When you upload an image to your Media Library, thumbnail versions of that image are created and stored on your server for all thumbnail sizes registered by your theme (and other possible sources). Occasionally, you may wish to deregister some of these thumbnail sizes for various reasons including:

To Remove Unneeded or Unused Thumbnail Sizes

There may be thumbnails registered for your site that you don’t need or use, and you may wish to deregister them so they won’t unnecessarily take up space on your server.

To Lower Imagify’s “Resize Larger Images” Setting

This setting cannot be lower than the width of your largest thumbnail. If you’d like your images to be resized to a lower value, then you’ll need to deregister all thumbnails with widths larger than that.

How To Deregister Unwanted Thumbnail Sizes

You can use Imagify’s Remove Thumbnail Sizes plugin to assist you with this. This helper plugin removes WordPress’ default thumbnail sizes of “1536×1536” and “2048×2048” but it’s likely that you’ll need to customize the plugin to remove your specific unwanted thumbnails.

Instructions to Customize the Remove Thumbnail Sizes Plugin

Start by going to your Imagify plugin settings page and view the files optimization section as pictured below:

Take note of the names of all the thumbnails that need to be deregistered. The widths are highlighted in orange and the thumbnail names are highlighted in yellow. Do not include the dimensions on the right side as part of the thumbnail names.

Steps to take once you have the names of all the thumbnails that need to be removed:

  1. Download the Remove Thumbnail Sizes plugin, unzip it, and open the PHP file in a text editor. Here you can view the part of the code that edits should be limited to:

    For each of the thumbnails to be deregistered, you will need to add a new line. Each new line of code should be identical to the line above it, except that you will update the thumbnail name in the highlighted area, and the last value you add should not end with a comma.

    So for example, if you were trying to also deregister the “post-thumbnail” and “twentytwenty-fullscreen” thumbnails (from the first image above), your code would be as follows:

  2. Once this is complete, save the PHP file and zip it back up into a .zip file.
  3. Install and activate this updated helper plugin through your WordPress Admin plugins page.
  4. Check to make sure the target thumbnail sizes have been removed from the Files Optimization section in your Imagify plugin settings page, and if so, you should be allowed to lower the “Resize larger images” setting to your desired value.