Skip to content

Instantly share code, notes, and snippets.

@Kaiderella

Kaiderella/functions.php Secret

Created Dec 23, 2019
Embed
What would you like to do?
Remove WordPress's default image sizes
//* Remove WordPress's default image sizes
function remove_default_image_sizes( $sizes) {
unset( $sizes['large']);
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['medium_large']);
unset( $sizes['1536x1536']);
unset( $sizes['2048x2048']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'remove_default_image_sizes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.