Loại bỏ các kích thước ảnh không phù hợp trong WordPress

function remove_unused_image_size( $sizes) {
 
   unset( $sizes['thumbnail']);
   unset( $sizes['medium']);
   unset( $sizes['large']);
  unset( $sizes['medium_large']);    
    unset( $sizes['1536x1536']);
   unset( $sizes['2048x2048']);
   unset( $sizes['woocommerce_thumbnail']);
   unset( $sizes['woocommerce_single']);
   unset( $sizes['woocommerce_gallery_thumbnail']);
   unset( $sizes['shop_catalog']);
   unset( $sizes['shop_single']);
   unset( $sizes['shop_thumbnail']);

}
add_filter('intermediate_image_sizes_advanced', 'remove_unused_image_size');

Related posts

0
Would love your thoughts, please comment.x
()
x