• Resolved yuliushalim

    (@yuliushalim)


    Hi,
    I am wondering why all of my images suddenly become blurred in woocommerce photo reviews. Apparently, every time an image is uploaded, it was resized to 500x500px. And Woocommerce photo reviews use that, instead of the full image.
    It used to be resized to 768x768px but a few days ago, it was suddenly resized to 500×500. How do I set the resizing settings? What caused it to suddeny change?

    Thanks guys

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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);
    Thread Starter yuliushalim

    (@yuliushalim)

    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.

    Yes i think they are your old pictures.
    Because you don’t know code, i recommend you use this plugin https://wordpress.org/plugins/code-snippets/ to add the above snippet.
    Here’s how it looks https://prnt.sc/v6sc96

    Thread Starter yuliushalim

    (@yuliushalim)

    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);
    Thread Starter yuliushalim

    (@yuliushalim)

    Oh wow, it worked. You have yourself a Premium Buyer! Thank you for the great responsive support!

    You’re welcome 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Blurry images’ is closed to new replies.