wandersondantas
4/16/2020 - 3:59 PM

Change Thumbnails size

add_action( 'init', 'change_thumbnails_size' );
function change_thumbnails_size() {
	remove_image_size( 'thumbnail');
	remove_image_size( 'medium' );
	remove_image_size( 'medium_large' );
	remove_image_size( 'large' );
	remove_image_size( '1536x1536' );
	remove_image_size( '2048x2048' );
	remove_image_size('woocommerce_thumbnail');
	remove_image_size('woocommerce_single');
	remove_image_size('woocommerce_gallery_thumbnail');
	remove_image_size('shop_catalog');
	remove_image_size('shop_single');
	remove_image_size('shop_thumbnail');
	
	// Criar Tamanhos de Imagem
	add_image_size( 'thumbnail', 150, 150, true );
	add_image_size( 'medium', 260, 301, true );
	add_image_size( 'medium_large', 600, 0);
	add_image_size( 'large', 1366, 471, true );
	add_image_size( 'banner2', 1366, 296, true );
	add_image_size( 'banner-mobile', 360, 360, true );

	// Criar Tamanhos de Imagem Woocommerce
	add_image_size('woocommerce_thumbnail', 260, 301, true );
	add_image_size('woocommerce_single', 600, 0);
	add_image_size('woocommerce_gallery_thumbnail', 150, 150, true );
	add_image_size('shop_catalog', 260, 301, true );
	add_image_size('shop_single', 600, 0);
	add_image_size('shop_thumbnail', 150, 150, true );
}