Plugin Author
ILLID
(@mihail-barinov)
Hi,
You can do this via following php code:
add_filter( 'aws_image_size', function( $size ){
return 'thumbnail';
} );
This force plugin uses thumbnail image size that is by default is 150px X 150px.
If you need a smaller size – you can add another image name that is smaller ( if you have such a custom one ) or change default thumbnail size via Settings -> Media page. https://prnt.sc/g8JYNDjY2kjx
Regards
Does this go in the functions.php file or one of the aws ones?
Also, what if I want the image to be a rectangle? Is there anywhere to override the results template format?
Plugin Author
ILLID
(@mihail-barinov)
Code snippets must be added into your child theme functions.php file or you can use a special plugin for adding such snippets.
About rectangle – it all depends on your image size that I mentioned above. You can set a custom image size 50 X 50 for thumbnail size and the plugin will use it.
Note: that applied only for newly added images. If you need to resize an old image you can use special plugins like this one.
I’m still having problems getting aws to recognize and use the custom image I’m creating with this code:
add_image_size( ‘aws-custom-wine-bottle’, 30, 90, false );
// Tell Advanced Woo Search to use it
add_filter( ‘aws_image_size’, function( $size ) {
return ‘aws-custom-wine-bottle’;
});
The search result pane keeps defaulting back to the square and cropped one. What am I doing wrong?
Also, I’ve tried regenerating the images several times.
Yeah, this is hardcoded somewhere is aws.
Plugin Author
ILLID
(@mihail-barinov)
Please check one more thing – those products that show incorrect images – do they have featured images or images are scrapped from the product content?
Regards
I figured out the issue. The image optimizer I was using was only creating thumbnails and if the proportionality of the original image was off any a little it would create the thumbnail file and name it with a 48×150 (for example), but apparently the 50×150 (defined as the WP thumbnail size) filename would be referenced when generating the image link on the page.
I uninstalled the image optimizer, regenerated the thumbnails, and everything worked.
Thanks for pointing me in the right direction.
Plugin Author
ILLID
(@mihail-barinov)
Great! Glad that your issue was resolved.