First gallery image wrong aspect ratio
-
My WooCommerce thumbnail cropping setting is 1:1 in the Customer, and a 100×100 thumbnail of the product image exists, but the gallery is displaying the full-size rectangular image as the thumbnail for the first image (the rest of the images use the 100×100 thumbnails).
I tried the solution in the Wrong size first (product) thread of adding a PHP snippet:
add_filter( 'woocommerce_gallery_thumbnail_size', function( $size ) { return 'thumbnail'; } );
That had no effect, so I added this for good measure:
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { return array( 'width' => 100, 'height' => 100, 'crop' => 1, ); } );
Still no effect. Is there something else I can try?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘First gallery image wrong aspect ratio’ is closed to new replies.