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
0
to the width and height settings in Dashboard > Settings > MediaWhen we add
0
then it successfully stops WordPress fro creating the intermediary sizes. Good!But for whatever reason,
medium_large
size 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 4 years, 6 months ago by .
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘medium_large image size is still generated even if set to 0’ is closed to new replies.