Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1432775

    I have the recently viewed products list widget on the single product pages. The images are randomly the wrong size (too small so blurry) and occasionally correct. I have used a lot of css to remove things like shopping cart, etc. that is not needed. Wondering if I have a conflict. The css goes back to 2013 although the problem is new.

    #1432900

    Hey ricedean,
    Thanks for the link to your site, the Recently Viewed Products widget show smaller image typically 36px square and should have a layout like this:
    Enfold_Support_4620.jpeg
    but it looks like you are using some custom css to show the small images larger, so the are blurry:
    Enfold_Support_4622.jpeg
    To correct this try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function larger_recently_viewed_products_widget_images() { ?>
      <script>
    (function($){
    $('.single-product .widget_recently_viewed_products').each(function(){
    $('.product_list_widget img.size-widget').attr('width', '250px');
    $('.product_list_widget img.size-widget').attr('height', '250px');
    $('.product_list_widget img.size-widget').attr('sizes', '(max-width: 450px) 100vw, 450px');
    });
    })(jQuery);
    </script>
      <?php
    }
    add_action( 'wp_footer', 'larger_recently_viewed_products_widget_images', 99 );

    This will change the image size used to a larger image so they won’t be blurry
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1432902

    That worked. Thank You!

    #1432905

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘woocommerce widget, recently viewed products, not showing correct size image’ is closed to new replies.