The Image in the Catalog should be set in WooCommerce over the Design -> customizer -> Produkt Images
Whatever there is been set is ignored.
That is because the image Size shop_catalog is already existing, becuase Enfold does set it.
In the config.php I find following code:
$avia_config['imgSize']['shop_thumbnail'] = array( 'width' => 120, 'height' => 120 );
$avia_config['imgSize']['shop_catalog'] = array( 'width' => 450, 'height' => 450 );
$avia_config['imgSize']['shop_single'] = array( 'width' => 450, 'height' => 999, 'crop' => false );
avia_backend_add_thumbnail_size( $avia_config );
When I want other dimentions, like 4:3 Format, instead of the enfold 1:1 Format, I need to add like following code:
add_action( 'after_setup_theme', 'wpdocs_theme_setup',999,1 );
function wpdocs_theme_setup() {
remove_image_size('shop_catalog');
add_image_size('shop_catalog', 300, 225, true );
}
Why is it needed that Enfold sets the images sizes for Woocommerce, when Woocommerce can do it be themself?
Hi BlutVampir,
Please add this code in functions.php of your child theme, if you don’t have a child theme then you can use the plugin called WPCode to insert this code snippet:
add_filter( 'avf_wc_before_shop_loop_item_title_img_size', 'avf_wc_before_shop_loop_item_title_img_size_mod', 10, 1 );
function avf_wc_before_shop_loop_item_title_img_size_mod( $thumbnail_size ) {
return 'woocommerce_thumbnail';
}
I hope it helps.
Best regards,
Nikko