Home New Guten Forums WoodMart support forum Product image size issue

Product image size issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #668791

    jimmy.xupp
    Participant

    Hello,

    I want to show my product images on the archive page in the ratio of 3:4, I managed to do that thanks to this instruction: https://mikeyarce.com/2024/04/how-to-override-woocommerce-image-sizes/

    <?php

    add_filter( ‘woocommerce_get_image_size_thumbnail’, function( $size ) {
    return array(
    ‘width’ => 600,
    ‘height’ => 800,
    ‘crop’ => 1,
    );
    } );

    <?php

    add_filter( ‘woocommerce_get_image_size_single’, function( $size ) {
    return array(
    ‘width’ => 750,
    ‘height’ => 1000,
    ‘crop’ => 1,
    );
    } );

    However I noticed the image changed to original ratio of 1:1, after clicking the swatch, I want the variable image also appear 3:4, how can I do that? Here is the link: https://wordpress-1481185-5623776.cloudwaysapps.com/shop/
    Attached is the screenshot

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

    Hello,

    Sorry to say, it requires customization and is beyond our support policy. Additional code customizations in theme files are out of our theme support scope.

    Please check this manual and upload the same size of product images: https://xtemos.com/docs-topic/image-size-and-content-alignment-in-a-product-grid/

    WooCommerce allows some settings that you can find under Appearance >> Customize >> WooCommerce >> Product Images.

    You can define the “height” of the shop thumbnails by setting up the width : height aspect ratio in the “Thumbnail cropping” section:

    Custom: In Custom, you can select the aspect ratio of the image.
    Here are some of the popular aspect ratios (1:1, 5:4, 4:3, 3:2, 16:9 and 3:1).

    Best Regards,

    #669565

    jimmy.xupp
    Participant

    Do you offer any customization service? We can pay for it.

    • This reply was modified 1 month, 3 weeks ago by jimmy.xupp.
    #669596

    Hello,

    Sorry for the inconvenience, but currently we are not offering any paid customization services.

    Thanks for your understanding.

    Best Regards,

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