Home Forums WoodMart support forum Product image changes format when clicking on variation

Product image changes format when clicking on variation

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #594468

    joelmellin
    Participant

    Hi,

    There is an issue with the format of the product pictures on the archive/shop page. The pictures changes its format when clicking on a variation swatch. It is only happening with those images that are not squared from the beginning. Se video:

    https://www.awesomescreenshot.com/video/31091393?key=bb74545e47e328b1300e6a073764f941

    #594715

    Hello,

    You need to upload images of the same size.

    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/

    Best Regards

    #594778

    joelmellin
    Participant

    Hi again,

    I think you misunderstood the issue.

    The thumbnails are in fact not uploaded as squares (we have hundreds of products and as you say in your own manual it is not always possible to upload them as squares), but since they are defined in the layouts as squares they should also be kept as squares when clicking on a swatch variable.

    #594887

    Hello,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.

    Best Regards

    #594894

    joelmellin
    Participant

    Ok, they are shared now.

    #595049

    Hello,

    Now visit your site’s landing page and click on the “1 hg” attribute of the “Jordnötter rostade med salt” product and check the image.

    Best Regards

    #595065

    joelmellin
    Participant

    It works now for the 1 hg variation when clicking on that. But not for the other variations.

    #595181

    Hello,

    I have uploaded the same size image for the “1 hg” variation. You need to upload images of the same size.

    Best Regards

    #595229

    joelmellin
    Participant

    It seems like you still not unserstand. It works perfect before they are not clicked on as you can see. The the picture is a square. But when a variation swatch is clicked, then the image changes. It shouldn’t change. It must be a bug or setting in the theme. I ask you to fix this since as it says in your manual that it is noy always possible to upload a certain size.

    #595466

    Hello,

    Ok, please share the correct/changed WP admin login details of your site. Your given login details are not working any more.

    Best Regards.

    #595528

    joelmellin
    Participant

    Ok, have done so.

    #595777

    Hello,

    First of all, we wanted to explain that the functionality of swatches on the product archive is the same as on the single product page, including variation images, because by default, WooCommerce variations are only available on the single product page. While the main product images in the product archive can be cropped using WooCommerce settings, WooCommerce does not have any options for cropping images from the single product page. As a result, when a variation is selected, it displays the image from the single product page, which cannot be cropped to match the aspect ratio of the images in the product archive due to WooCommerce’s lack of this functionality.

    This issue can be resolved in two ways:

    1. Use the same aspect ratio for images on both the single product page and the archive. In your case, all images should be uploaded with a square aspect ratio of 1:1.

    2. Since you are using a simple aspect ratio, alternatively, you can use the following custom CSS code for the product archive, which will not physically crop the image but will make it appear square using CSS.

    .wd-product .attachment-woocommerce_thumbnail img {
    	aspect-ratio: 1;
    	object-fit: cover;
    }

    Best Regards.

    #595817

    joelmellin
    Participant

    Thank you. The css code works.

    But wouldn’t it also be possible to just use a code that says that the already cropped picture on the archive page should not change when a variation is clicked on, but instead just remain as it is? Since we don’t have a picture for each variation, but always only use the picture for the parent product for all variations this should be possible right?

    #596058

    Hello,

    Unfortunately, it’s not possible to achieve this with simple custom code. To prevent the variation images from showing when a variation is selected, you would need either to not assign an image to each individual variation in the variation settings or leave the field empty (https://monosnap.com/file/pVutkyjdI3ogMH8qxEIOGwwL5QwZIw), or disable the display of variations on the product archive (https://monosnap.com/file/QaznbF7ASvhEHwk7tbRqqDDT9jpGxk).

    Best Regards.

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