Title: Changing lightbox image size
Last modified: August 22, 2016

---

# Changing lightbox image size

 *  Resolved [crdunst](https://wordpress.org/support/users/crdunst/)
 * (@crdunst)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/changing-lightbox-image-size/)
 * Hi guys, my client has really large images uploaded and lightbox enabled, so 
   when visitors click on a product image, there’s a long delay before the high 
   res version is displayed.
 * Do you know if there’s a way to change the lightbox image from ‘full’ to ‘large’
   for example? Do you have a function or filter that could change this?
 * Thanks.
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

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

 *  Thread Starter [crdunst](https://wordpress.org/support/users/crdunst/)
 * (@crdunst)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/changing-lightbox-image-size/#post-5865086)
 * If it helps anyone else, there doesn’t seem to be a filter for this, but you 
   can copy the \single-product\product-image.php template into your theme, and 
   edit it as follows:
 * Replace
 *     ```
       $image_link = wp_get_attachment_url( get_post_thumbnail_id() );
       ```
   
 * With
 *     ```
       $image_link_array = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
       $image_link = $image_link_array[0];
       ```
   
 * Just replace the ‘large’ image size with whichever size you want to use.
 *  [NettSite](https://wordpress.org/support/users/nettsite/)
 * (@nettsite)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/changing-lightbox-image-size/#post-5865195)
 * Well done, Mr Dunst, you are a gentleman indeed.
 * All that needs to be added is that the same thing needs to be done on the product-
   thumbnails.php template.
 * Many thanks for the lead.
 * I have applied it on [African Scarves](http://www.africanscarves.co.za)
 *  [NettSite](https://wordpress.org/support/users/nettsite/)
 * (@nettsite)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/changing-lightbox-image-size/#post-5865196)
 * Update: Not quite the same for product-thumbnails.php:
 *     ```
       /**
       * Get WooCommerce to use "large" images in the lightbox instead of the originals.
       * Replace $image_link = wp_get_attachment_url( $attachment_id ); with the following two lines.
       */
       $image_link_array = wp_get_attachment_image_src($attachment_id, 'large');
       $image_link = $image_link_array[0];
       ```
   

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

The topic ‘Changing lightbox image size’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [size](https://wordpress.org/support/topic-tag/size/)

 * 3 replies
 * 2 participants
 * Last reply from: [NettSite](https://wordpress.org/support/users/nettsite/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/changing-lightbox-image-size/#post-5865196)
 * Status: resolved