• Resolved Jaap de Wit

    (@hitec4ever)


    Hi,

    I’ve set the plugin to resize only Woocommerce single images and thumbnails to 1000×666 and 400×400. When I run the regeneration I see the images being created in the directory. (new images with 1000×666 in the filename)

    Images are used on the productpage but when I click any image it will open the original image in the lightbox.

    For example: https://staging.whatiship.nl/product/its-about-romi-plafonniere-verona-amber/

    Can this be solved?

    Cheers,
    Jaap

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @hitec4ever

    The original images are not being altered by the plugin. If you want all images to appear in the lightbox at the same size, you can add the following code snippet to your child theme’s functions.php file or to the Code Snippets plugin:

    add_filter('woocommerce_product_thumbnails_large_size', function(){ return 'woocommerce_single';});

    This code snippet ensures that when you click on any image, a large resized image will be displayed in the lightbox instead of the original image.

    Thread Starter Jaap de Wit

    (@hitec4ever)

    Hi Nabil,

    Thanks for the snippet. This works perfectly!

    Cheers,
    Jaap

    Thread Starter Jaap de Wit

    (@hitec4ever)

    Hi,

    The snippet does work for newly uploaded and resized images but it causes issues for existing productimages shown in lightbox.

    See: https://staging.whatiship.nl/product/yanai-eetkamerstoel-biscuit-beach-turn-black/

    The lightbox images show small after the snippet is active.
    How can I enable the snippet only for new and resized images?

    Cheers,
    Jaap

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image resized but not used in Lightbox’ is closed to new replies.