Skip to content

Instantly share code, notes, and snippets.

@rajeebbanstola
Forked from BrandonShutter/images.php
Last active September 11, 2015 05:24
Show Gist options
  • Save rajeebbanstola/87c586f80e2845291ed7 to your computer and use it in GitHub Desktop.
Save rajeebbanstola/87c586f80e2845291ed7 to your computer and use it in GitHub Desktop.
Remove WordPress automatic cropping
<?php
/**
* Remove standard image sizes so that these sizes are not created during the Media Upload process
*
* @param $sizes, array of default images
* @return $sizes, new array of images
*/
function cn_image_sizes( $sizes) {
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['large']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'cn_image_sizes');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment