Viewing 2 replies - 1 through 2 (of 2 total)
  • Same question

    Thread Starter klemus

    (@klemus)

    Yay! I figured it out on my own! I used the following code change to link the product image straight to the ‘large’ image. Lightbox automatically takes what the product is linked to so it will open the large image.

    Open woocommerce/templates/single-product/product-image.php

    Change the following code:
    $image_link = wp_get_attachment_url( get_post_thumbnail_id() );

    to this:
    $image_id = get_post_thumbnail_id();
    $image_url = wp_get_attachment_image_src($image_id,’large’, true);
    $image_link = $image_url[0];

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Link image to "Large" image rather than original size’ is closed to new replies.