title: Woocommerce Having Trouble Loading Thumbnail as Main Product Image
body: <p>I'm trying to accomplish the following task: when a user clicks a thumbnail, that image is loaded and replaces the main product image. I'm using the default WooCommerce template to display product images (I believe the only modification is removing the link on the main product image in  <code>product-image.php</code>).</p>
  
  <p>However, when the user clicks, the large image does not load correctly. Strangely...when you inspect the source closely, the img src has the correct image URL but is not displaying the image. Not sure why this is happening!</p>
  
  <p>Here's an example site: <a href="http://www.cchcollection.com.php54-5.ord1-1.websitetestlink.com/product/kenan-jacket" rel="nofollow">http://www.cchcollection.com.php54-5.ord1-1.websitetestlink.com/product/kenan-jacket</a></p>
  
  <p>And the jQuery I'm using (the logic is - grab the thumbnail's URL, replace its size with the correct size in the string, then replace the src of the main image with that new URL).</p>
  
  <pre><code>jQuery(document).on('click','.thumbnails .zoom', function(){
      var photo_fullsize =  jQuery(this).find('img').attr('src').replace('-76x88','-540x623');
  
      jQuery('.woocommerce-main-image img').attr('src', photo_fullsize);
      return false;
  });
  </code></pre>
  
  <p>I'm happy to provide more code/details/accept another solution that requires less engineering. Thank you!</p>