Prevent WordPress from Generating Default Image Sizes

You will learn how to remove default image sizes in WordPress. Which are default image sizes. Let's learn how to remove default image sizes or prevent WordPress to generate extra images and save Disk Space. KKRww8I5uOw

WordPress always create default image sizes which are necessary for every blog or website. Sometime those images becomes headache and digesting our disk space. Which then need to be remove. We are describing to Prevent WordPress from Generating Default Image Sizes.

Image Sizes in WordPress

Usually default images sizes created by WordPress are 3 of them Thumbnail, Medium, Large. 150×150 , 300×300, 1024×1024. Obviously they are not usable every time only 1 image size is necessary. Which is 150×150.

Remove Default Image Sizes

If we keep uploading images, and WordPress keep multiplying each image 4 time then we will get ourselves in low of storage space.

  1. Login to your WordPress Go to your Dashboard.
  2. Go to your Setting and see there is a Media option click it.

    Wordpress Media Setting Two Clock

    Media Setting

  3. In media setting you will see there is Thumbnail Size. Leave it Exactly for thumbnail purpose.
  4. Change the values of Medium size and Large Size. to with:0 and height:0.

    Prevent WordPress From Generating Default Image Sizes

    Remove Default Image Sizes

  5. If you want to define other size of your own choice then you can give values. You Successfully done it.

Image Sizes Advance Part

Image Sizes from Theme

WordPress Themes itself creates some default images from their own core files. Not all but some of them love doing this for better look of theme. If you see other images whose sizes are not available in your media setting where to look that.

Remove Image Sizes – Functions File

We’ll need to alter functions.php file to remove those extra variants created by theme itself. In order to accomplish read below.

  1. Go to your WP-Content folder and then in Themes.
  2. Select your current theme which is active.
  3. Go to Functions.php and select edit or open it in your favorite editor.
  4. Now scroll down and search for add_image_size. Comment this line or remove.
  5. If you don’t want post thumbnail size then remove or comment set_post_thumbnail_size.
  6. Now you will get only original size image.

Those image sizes are according to them. If you want to define according to your choice then do define or change the sizes. If you want further assistant then do comment we will provide you the best solution which will help you to solve your problem.

 

Leave a Reply

Your email address will not be published. Required fields are marked *