• I’m trying to remove 15 or so unnecessary thumbnail sizes and would like to regenerate and remove them from the server.

    I started with a few sizes and tried this code in the functions.php file

    
    function remove_default_image_sizes( $sizes) {
        unset( $sizes['portfolio-square']);
        unset( $sizes['portfolio-landscape']);
        unset( $sizes['portfolio-portrait']);
    	unset( $sizes['portfolio-default']);
        unset( $sizes['portfolio_masonry_regular']);
        unset( $sizes['portfolio_masonry_wide']);
        return $sizes;
    }
    
    add_filter('intermediate_image_sizes', 'remove_default_image_sizes');

    and those sizes are still showing in the Thumbnail Size list on the Regenerate Thumbnails page.

    Any suggestions?

    I’m not familiar with using the WP-CLI

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Unable to remove image sizes’ is closed to new replies.