WordPress has a robust image-resizing system. In Settings > Media, you can define thumbnail, medium, and large sizes. It also creates a -scaled version when an upload is very large. Since WordPress 5.3, it additionally generates 768px, 1536px, and 2048px versions to support the srcset and sizes attributes on responsive images. At the high end, that can mean seven automatic sizes per image—and more if the active theme registers custom crops.

WordPress image size settings

If you set all three media sizes to 0, WordPress 5.3+ will still produce 1536, 2048, and scaled copies. The 768, 1536, and 2048 variants are rarely used in normal conditions. So how do you remove automatic cropping?

Add this to the active theme’s functions.php file:

add_filter('intermediate_image_sizes_advanced', '__return_false' ); // Remove image cropping
add_filter('big_image_size_threshold', '__return_false' ); // Remove scaled image cropping

The first line disables all custom size generation: theme-defined crops, WordPress’s default 768/1536/2048 sizes, and the thumbnail/medium/large sizes configured in Settings > Media. The second line only prevents the -scaled version. Use whichever fits your needs.

To remove specific sizes instead of all of them:

// Remove image sizes selectively
add_filter('intermediate_image_sizes_advanced', 'filter_image_sizes');
function filter_image_sizes( $sizes) {
unset( $sizes['1536x1536']);
unset( $sizes['2048x2048']);
return $sizes;
}

On my sites, I don’t use WordPress’s automatic crop sizes. They may get used sometimes, but there’s no guarantee they’ll match a future redesign or a decision to serve higher-quality images. Instead, I let the server crop images on demand: when a page needs a particular size, request parameters trigger a real-time crop. That avoids storing multiple versions of the same image, so the server keeps only the original upload.