Home Forums WoodMart support forum Gallery Thumbnail Size Issue

Gallery Thumbnail Size Issue

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

    faheem ahmed
    Participant

    Hi Team,

    On my website, the Gallery Thumbnails Images on the product page download (by right click on the gallery thumbnail and opening in the new tab) with the dimensions of the “Main image width” of 800 pixels instead of the actual width size provided on the WoodMart Theme Settings > Single product > Images > Thumbnails image width 200 pixels when browsing on Google Chrome browser but download the right image width when browsing on Firefox. Get the same big-size images when testing on GTmetrix. ( https://gtmetrix.com/reports/ebag.ca/rDav7OU5/ )
    Also if I de-activate Woodmart theme and activate twentytwentythree theme then on both browsers the thumbnail image size is right and not 800 pixels.

    Kindly look into it and please let me know how to manage this issue.

    Thanks in advance
    Faheem

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

    Hello,

    Woocommerce by default crops images, you can find more details on this forum: https://wordpress.org/support/topic/gallery-thumbnails-size-of-single-product-page/

    WoodMart theme just allows changing the size of gallery items.

    Please check the issue on the Storefront theme to detect if Woodmart causes any problems.

    Best Regards

    #467526

    faheem ahmed
    Participant

    Hi Elise,

    I’ve installed the Storefront theme and the gallery thumbnail images have the right size 100×100.
    Please see the attached screenshot of the thumbnail and the image size appearing in GTmetrix test. (https://gtmetrix.com/reports/ebag.ca/ST3bitbw/)

    You already have the admin credentials so please look into the problem because in Woodmart the gallery thumbnail images are appearing of the size of “Full Size image” having main image width i.e 800 pixels.

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

    Hello,

    The images reduces due to scrset here is the documentation: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images.

    You can deactivate it, at the same time we do not recommend doing that.

    If you still want to do it, here is the code:

    function wd_disable_wp_responsive_images() {
    	return 1;
    }
    
    add_action( 'woocommerce_gallery_thumbnail_size', function () {
    	add_filter('max_srcset_image_width', 'wd_disable_wp_responsive_images');
    });
    
    add_action( 'elementor/frontend/widget/after_render', function ( $element ) {
    	remove_filter('max_srcset_image_width', 'wd_disable_wp_responsive_images');
    });

    You need to add the code to the functions.php of the child theme.

    Best Regards

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