Hi,
Our plugin has never resized image to 768x768px, it has always been 500x500px.
If you want to use the medium or full size, please add below snippet:
add_filter( 'woocommerce_photo_reviews_masonry_thumbnail_main', function ( $thumb_url, $image_post_id ) {
$image_src = wp_get_attachment_image_url( $image_post_id, 'medium' );
//$image_src = wp_get_attachment_image_url( $image_post_id, 'full' );
if ( $image_src ) {
$thumb_url = $image_src;
}
return $thumb_url;
}, 10, 2);
Thank you for the snippet. I am a newbie, would you mind telling me, where exactly should I insert the snippet? I noticed that all new uploads are 500px by 500px but I am pretty sure it was 768×768 before (old pictures), maybe because those pictures are there before photo reviews was activated. But strangely, now, if I disable photo reviews, upload new photos, then enable photo reviews, and upload the images to my reviews, the resized images are even worse, the dimensions become 200x300px.
Thank you for your incredibly fast response and very clear instructions. Unfortunately, it seems like, after inserting the snippet, it is using 200x300px images instead. Here’s the website… https://www.sovereignemblem.com/product/personalizable-picture-and-name-couples-unisex-t-shirt/#comment-117
You may notice that earlier on, I said that, if I disable photo reviews, upload image, then reactivate it, Photo reviews will use 200x300px versions of the uploaded image. This may be what is happening now. The code snippet somehow overrides the photo reviews settings. Can you make the image to be uncompressed? Orignal uploaded image is 512×768.
If you look at the product photos below, they are quite sharp. That’s woocommerce’s “customize->image size” settings. Used to be 300 but I changed it to 768
Please help.
-
This reply was modified 5 years, 5 months ago by
yuliushalim.
-
This reply was modified 5 years, 5 months ago by
yuliushalim.
-
This reply was modified 5 years, 5 months ago by
yuliushalim.
Sorry for not explaining clearly.
Please replace ‘medium’ with ‘full’ in the snippet. Or you can replace the old snippet with below one:
add_filter( 'woocommerce_photo_reviews_masonry_thumbnail_main', function ( $thumb_url, $image_post_id ) {
$image_src = wp_get_attachment_image_url( $image_post_id, 'full' );
if ( $image_src ) {
$thumb_url = $image_src;
}
return $thumb_url;
}, 10, 2);
Oh wow, it worked. You have yourself a Premium Buyer! Thank you for the great responsive support!