Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1469965

    In some recent updates, the product gallery images are now square.

    I can load an old image that was already in the media library into a product page and it looks fine, but a new image comes in as square. See the sample page here: https://galaxypress.com/product/battlefield-earth-trade-paperback-russian/

    I have checked in the Appearance/Customize/WooCommerce and the product images are “uncropped”.

    I looked in my functions and CSS and don’t see anything that would be causing this now. Again an old image looks fine, it is just newly imported images that are doing this.

    I also see the same issue on the shop page where it is cropped and then you go to the actual page and the image is fine. She here:
    https://galaxypress.com/shop/?filter_format=foreign-language-books
    The last title with purple books for $50 in Russian is cropped on the page, but when you click the actual page it is fine, see here:

    I am running WP 6.6.2 with an Enfold Child Theme running the latest Enfold of 6.0.6. PHP version is 8.2.23 (Supports 64bit values).

    #1469968

    Hey Jason,

    Thank you for the inquiry.

    Please try to add this filter in the functions.php file to use the default thumbnail size:

    add_filter( 'avf_wc_before_shop_loop_item_title_img_size', 'avf_wc_before_shop_loop_item_title_img_size_mod', 10, 1 );
    function avf_wc_before_shop_loop_item_title_img_size_mod( $thumbnail_size ) {
        return 'woocommerce_thumbnail';
    }

    Best regards,
    Ismael

    #1470034

    Thank you for the fast reply. This fixed it in the shop so that it is not cropped now, but on the individual page, the product gallery images are still square. See here:

    #1470057

    Hi,

    Thank you for the update.

    Try including this filter as well:

    add_filter('woocommerce_gallery_thumbnail_size', 'avf_custom_single_product_gallery_thumbnail_size');
    function avf_custom_single_product_gallery_thumbnail_size() {
        return 'full';
    }
    

    Best regards,
    Ismael

    #1470063

    Thank you for the fast reply. I have added this code but after clearing the cache it still is a square image size on the gallery images on the product page under the main image. Again what is so odd is this is a new issue with one of the recent updates as in the past they were always full-sized and not copped as squares. Please advise.

    • This reply was modified 2 weeks ago by Jason.
    #1470184

    Hi,

    Thank you for the update.

    Did you set the Enfold > Shop Options > Product Gallery settings to Woocommerce 3.0 product gallery? The filter above will only work if the default 3.0 product gallery is active.

    Best regards,
    Ismael

    #1470200

    Okay so I went and updated it to the Woocommerce 3.0 product gallery and they did show up as full size. However, there are other issues with the Woocommerce 3.0 product gallery that don’t work with my site layout.

    1. The main image also now shows up in the product gallery. This is redundant and looks odd to me.
    2. There is a black border around each gallery image that I would prefer not to have as I am trying to have a clean look.
    3. There is some type of Zooming effect on the main product image that I don’t want.

    Is there no way to just make the images full-size as they were before? I still don’t get why this suddenly changed as this was never a problem for many years I have been using this Enfold shop.

    #1470312

    Hi,

    there no way to just make the images full-size as they were before?

    Please switch back to the default enfold product gallery, then add this filter in the functions.php file to adjust the thumbnail size:

    add_filter('single_product_small_thumbnail_size', function($size) {
        $size = 'full';
        return $size;
    }, 10, 1);

    Best regards,
    Ismael

    #1470321

    FANTASTIC!!! That worked for the gallery images are now back to full size.

    THANK YOU!!!!!

    #1470384

    Hi,

    Great! Glad to know that this has been resolved. Please feel free to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Product Gallery Images now square and cropped on new images?’ is closed to new replies.