• Resolved donkelly22

    (@donkelly22)


    Hi Everyone,

    I have a problem of blurry product thumbnails following a woocommerce update.

    The solution is as follows:

    add_filter( ‘woocommerce_get_image_size_gallery_thumbnail’, function( $size ) {
    return array(
    ‘width’ => 148,
    ‘height’ => 148,
    ‘crop’ => 0,
    );
    } );

    However I am unclear as to how to implement this. (I am new to WordPress)

    Could somebody please guide me?

    Thanks in advance,

    Don

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can enter bits of code using this plugin:
    https://wordpress.org/plugins/code-snippets/

    There are other similar plugins.

    As time moves on and you accumulate lots of snippets and perhaps custom templates, you can make a child theme:
    https://codex.wordpress.org/Child_Themes
    In this case your code can go in functions.php for the child theme.

    Thread Starter donkelly22

    (@donkelly22)

    Hi lorro,

    Thanks for your reply. I didn’t have any luck when I entered the code into code-snippets but i’ll keep trying.

    I think that’s an old hook that’s not longer used. Try:

    add_filter( 'woocommerce_gallery_thumbnail_size', function( $size ) {
      return array( '148', '148' );
    } );
    Thread Starter donkelly22

    (@donkelly22)

    Thanks lorro, but no luck. The product thumbnails on woocommerce are still blurry. I’m using Astra as a theme.

    The gallery thumbnails are the tiny alternative images that appear under the product thumbnails. Different. To set the size of the product thumbnails, go to:
    Dashboard > Appearance > Customize > WooCommerce > Product Images

    I think if product images sizes are changed, regeneration of existing product image thumbnails is automatic, but if it is gallery thumbnails that you want to change you may need to regenerate thumbnails using this plugin:
    https://wordpress.org/plugins/regenerate-thumbnails/
    Not sure, but won’t hurt to run it.

    Thread Starter donkelly22

    (@donkelly22)

    Thanks lorro for your replies.

    Just found a solution that makes the woocommerce thumbnails sharp. Install the following plugin:

    Woocommerce Thumbnails Slider.

    Did the trick for me!

    • This reply was modified 7 years, 4 months ago by donkelly22.
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Woocommerce code implementation’ is closed to new replies.