Skip Unneeded Image Sizes
Stops WordPress from generating the medium_large, 1536px and 2048px copies of every upload, saving disk space.
Opens WPIDE on
Code
add_filter( 'intermediate_image_sizes_advanced', function ( $sizes ) {
unset( $sizes['medium_large'], $sizes['1536x1536'], $sizes['2048x2048'] );
return $sizes;
} );
Notes
Responsive images will have fewer sizes to choose from on large screens.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.