Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #11659

    Wanting to change the 290×216 product image to be portrait ratio, as well as make the main product image on the individual product overview 400px wide instead of 290 wide. I tried un-ticking woocommerce/settings/catalog “hard crop”, it worked for the product overview page, and all the other thumbnails except for the individual product page.

    Also tried this code for config.php:

    //product thumbnails

    $avia_config = array(‘width’=>80, ‘height’=>80);

    $avia_config = array(‘width’=>450, ‘height’=>9999);

    $avia_config = array(‘width’=>450, ‘height’=>9999);

    Every attempt I ran the ‘regenerate thumbnails’ plugin, emptied cache etc.




    Open plugins > woocommerce > templates > single-product > product-image.php then look for

    <?php echo get_the_post_thumbnail($post->ID, $large_thumbnail_size) ?>

    replace it with this

    <?php echo get_the_post_thumbnail($post->ID, array(150,500) ?>

    Basically, ust replace “$large_thumbnail_size” to “array(150,500)” which is the width and height of the thumbnails in pixels respectively.

    Hope this helps. :)



Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Need to change Images on Single Product page to portrait ratio’ is closed to new replies.