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.
- Login to your WordPress Go to your Dashboard.
- Go to your Setting and see there is a Media option click it.
- In media setting you will see there is Thumbnail Size. Leave it Exactly for thumbnail purpose.
- Change the values of Medium size and Large Size. to with:0 and height:0.
- 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.
- Go to your WP-Content folder and then in Themes.
- Select your current theme which is active.
- Go to Functions.php and select edit or open it in your favorite editor.
- Now scroll down and search for add_image_size. Comment this line or remove.
- If you don’t want post thumbnail size then remove or comment set_post_thumbnail_size.
- 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.