Home Forums WoodMart support forum Crop thumbnails on the product page

Crop thumbnails on the product page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #383328

    Andrew_khv
    Participant

    Hi,
    I want to crop image thumbnails on the product page (area : div class=owl-stage-outer)

    I have edited file woocommerce/single-product/product-thumbnails.php:
    $thumbnail_size replaced with:

    $thumbnail_size    = apply_filters(
    			'woocommerce_gallery_thumbnail_size',
    			array(
    				'width'  => 150,
    				'height' => 150,
    				'crop'   => 1,
    			)
    		);

    It works for all images except first, ( first image not cropped )

    I can’t figure out what to do

    • This topic was modified 3 years, 1 month ago by Andrew_khv.
    Attachments:
    You must be logged in to view attached files.
    #383497

    Hello,

    You can change the size of the thumbnails from Theme Settings >> Single Product >> Images.

    Screenshot: https://gyazo.com/85626b56c36280e8f22c3df5e4b63427

    Best Regards

    #383634

    Andrew_khv
    Participant

    The goal is to crop photos with different lengths into one format
    I did this for additional images
    But can’t do for the main image

    Attachments:
    You must be logged in to view attached files.
    #383684

    Hello,

    Instead of using Code to crop images. Please try using the Theme option to crop image thumbnails then check back.

    You can change the size of the thumbnails from Theme Settings >> Single Product >> Images.

    Screenshot: https://gyazo.com/85626b56c36280e8f22c3df5e4b63427

    Best Regards

    #383783

    Andrew_khv
    Participant

    This option ( Theme Settings >> Single Product >> Images.) resize image , not crop

    It turns out like this (attachment 1)

    It should be like image 2-4 (equal length for all images) (attachment 2)

    Attachments:
    You must be logged in to view attached files.
    #383814

    Andrew_khv
    Participant

    To put it simply – thumbnails on the product page should be displayed in the same way as pictures in media files (equal cropped regardless of aspect ratio)

    Attachments:
    You must be logged in to view attached files.
    #383994

    Hello,

    You need to Regenerate all the thumbnails after setting the size to make them work.

    Best Regards

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