Tagged: woocommerce 3
Hi
I have noticed that my product images are all out of focus. This has never been a problem before. Something has changed but not sure what!
Any ideas? I certainly do not want to resize all the images again.
There was a recent woocommerce update?? I have added two URL’s to show you the problem
Regards
Richard
Hey Richard,
Try adding this code in functions.php (bottom):
global $woocommerce;
if( version_compare( $woocommerce->version, '3.0.0', ">=" ) ) {
function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id, $image_class ) {
return $img;
}
function avia_woocommerce_post_thumbnail_description($img, $post_id){
return $img;
}
}
Let us know if this helps.
Best regards,
Nikko
Hi Nikko
Perfect. Thank you. Not being a coder what did that coding actually do??
Regards
Richard
Hi Richard,
You’re welcome. Basically it’s just checking if woocommerce version is version 3.0.0 or greater, if it is then it overrides the function to just use the product image assigned to it and not rescale it (which works perfectly fine in woocommerce 2.x.x). Hope my explanation is clear and not so technical :)
Best regards,
Nikko
@nikko perfect. I am glad you finally recommend my solution as the official solution. Sounds like the next Enfold update is very close now ;-)
Hi mensmaximus,
Yes, I did try the solution you posted and the part to fix blurry images is perfect! Thanks for helping out :)
Best regards,
Nikko