Gallery

<?php

// bomendael
// enable next/prev navigation for product gallery
add_filter( 'woocommerce_single_product_carousel_options', function($options) {
  $options['directionNav'] = true;
  return $options;
});

// change main image size
add_filter( 'woocommerce_gallery_full_size', function( $size ) {
  return 'large';
} );

// change gallery image size main
add_filter( 'woocommerce_get_image_size_single', function( $size ) {
  return array(
    'width' => 450,
    'height' => 600,
    'crop' => 1,
  );
});

// change gallery image size thumbnail
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) {
  return array(
    'width' => 150,
    'height' => 180,
    'crop' => 1,
  );
  return $size;
});
Last Updated:
Contributors: Niek Vlam, Suite Seven