Do you want to remove image sizes from the media library? This snippet will let you remove image sizes from the media library.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
function wps_remove_image_size($sizes) { unset( $sizes['small'] ); unset( $sizes['medium'] ); unset( $sizes['large'] ); return $sizes; } add_filter('image_size_names_choose', 'wps_remove_image_size');
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our Soliloquy Review.
Comments Leave a Reply