Innovate | Connect | Transform
ContactService statusUSD $

GICT knowledge base

How to Stop WordPress from Creating Additional Image Sizes

Published

WordPress

Whenever you upload an image to your media library, WordPress, by default, creates three copies of that image including thumbnail, medium and large versions. Some themes or plugins may also create additional image sizes, and by editing your theme functions file, you can even specify additional sizes other than the three default ones. However, having multiple different sized versions of your images takes up a lot more space on your Web hosting server, and it also makes your WordPress backups much larger and more time-consuming to create, particularly if you have a large database of images. For this reason, you may want to prevent WordPress from creating additional image sizes which you have no use for. This guide explains how to achieve this in just a few minutes.

 

  1. If you are not sure how many additional images WordPress is currently creating when you upload a new image to the media library, you can quickly find out by logging into your FTP server and navigating to /wp-content/uploads to view the image copies created by WordPress. In this directory, you will see the names of your image files followed by the dimensions. Find out how many copies of the same image there are.
  2. In your WordPress administrator dashboard, navigate to Settings > Media. Setting the sizes to 0 will prevent WordPress from creating additional images. It is wise to leave the thumbnail size setting intact (or reduce it as required) rather than use 0, since doing so will cause display problems with your WordPress media gallery. Click “Save Changes” to continue.
  3. If your current theme is creating additional image sizes, you will need to edit the relevant lines of code in the functions.php file of your currently active theme. To do this, navigate to Appearance > Editor and click on “functions.php” in the right-side column. Scroll down the page of code to find any lines starting with the “add_image_size” operator, and edit or remove them as required. Removing them will prevent your active theme from creating additional copies of your uploaded images.
    Stp Wp Crt Add Imgs Media Sttings

Related guides

Account services are unavailable until the production backend is configured.