Skip to content

Instantly share code, notes, and snippets.

@dnshulga
Last active May 23, 2019 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnshulga/f45fee90bed8b14f9260aac83d6ea5f4 to your computer and use it in GitHub Desktop.
Save dnshulga/f45fee90bed8b14f9260aac83d6ea5f4 to your computer and use it in GitHub Desktop.
function remove_default_woo_image_sizes( $sizes ) {
unset( $sizes[ 'shop_thumbnail' ]);
unset( $sizes[ 'shop_catalog' ]);
unset( $sizes[ 'shop_single' ]);
unset( $sizes[ 'woocommerce_thumbnail' ]);
unset( $sizes[ 'woocommerce_single' ]);
unset( $sizes[ 'woocommerce_gallery_thumbnail' ]);
return $sizes;
}
add_filter( 'intermediate_image_sizes_advanced', 'remove_default_woo_image_sizes' );
@dnshulga
Copy link
Author

dnshulga commented Apr 16, 2019

Don't forget regenerate thumbnails (for example, via the plugin Force Regenerate Thumbnails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment