medium_large image size is still generated even if set to 0
-
In WordPress to stop WordPress generating place-wasting thumbnails and other image sizes, we can add
0to the width and height settings in Dashboard > Settings > MediaWhen we add
0then it successfully stops WordPress fro creating the intermediary sizes. Good!But for whatever reason,
medium_largesize is still added, even if we set it to 0.
The only way of stopping this snowflake is toadd_filter( 'intermediate_image_sizes', function( $sizes ) { return array_filter( $sizes, function( $val ) { return 'medium_large' !== $val; // Filter out 'medium_large' } ); } );Why is this?
Why is this not just handled centrally like with any other image size?
Usually we can do this:add_action( 'init', 'remove_extra_image_sizes'); function remove_extra_image_sizes() { foreach ( get_intermediate_image_sizes() as $size ) { if ( !in_array( $size, array( 'a_size', 'another_size' ) ) ) { remove_image_size( $size ); } } }WP medium_large size seems to be somehow out of the usual flow.
Thoughts?
Cheers..
- This topic was modified 5 years, 3 months ago by .
The topic ‘medium_large image size is still generated even if set to 0’ is closed to new replies.