1
vote
Hi,
I choose to show swatches in the catalog with the ability to change the product image when clicking on the swatch. The problem is that the ‘shop_thumbnail’ that is shown by default by this plugin is using an image that is small (300×300) and images in the catalog have (400×400) and when I click and the image changed the variation image is blurry.
I use a workaround by creating a filter and I think this could be implemented easily without any side effects. Filter names should be established by the development team and also documented. Below is my example.
In class_products.php line::468 I changed this:
$thumbnail_size = Iconic_WAS_Helpers::get_image_size_name( ‘shop_thumbnail’ );
with:
$thumbnail = Iconic_WAS_Helpers::get_image_size_name( ‘shop_thumbnail’ );
$thumbnail_size = apply_filters( ‘iconic_catalog_product_thumbnail_size’, $thumbnail );
Then you can use it in your theme functions.php file:
add_filter( ‘iconic_catalog_product_thumbnail_size’, function($size) {
return ‘custom_size’;
});
NOTE: I know I can rebuild my entire media with a new catalog size but I have more than 10k images.
Have a nice day