How do i disable auto creation of thumbnails in WordPress

How do i disable auto creation of thumbnails in WordPress

You know by default, WordPress generates three sizes of each image that you upload. Themes and plugins can generate additional image sizes which can easily push the number between 5 – 10. If you have a lot of image based content on your site, then after a while this may increase your storage needs and backup file size. In this article, we will show you how to prevent WordPress from generating image sizes.
If you are trying to stop WordPress upload from making extra copies of image that when you upload images and you want only the one image and nothing more.
1. First thing you should keep in mind is that the default image sizes are not harmful for your website.
2. Second you need to understand how many copies of an uploaded image are generated by WordPress.

Just copy and pest code into your function.php file

function wp_filter_image_sizes( $sizes) {
unset( $sizes['medium']);
unset( $sizes['large']);
unset( $sizes['thumbnail']);
unset( $sizes['768x358']);
unset( $sizes['768x300']);
return $sizes;
add_filter('intermediate_image_sizes_advanced', 'wp_filter_image_sizes');

About Author

My name is Mukesh Jakhar and I am a Web Application Developer and Software Developer, currently living in Jaipur, India. I have a Master of Computer Application in Computer Science from JNU Jaipur University. I loves to write on technology and programming topics. Apart from this, I love to travel and enjoy the beauty of nature.

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.