Home Forums WoodMart support forum Extra Images Loading in Theme.

Extra Images Loading in Theme.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #559453

    it-1760
    Participant

    Hi,

    I’m using the Woodmart theme across multiple projects, but I’ve noticed that it’s loading several additional images alongside a single image, impacting speed and performance. The attached screenshot illustrates this problem. I only need one image to load in my source code, but the additional images are creating bloat and affecting my client’s business.

    Could you please provide a solution to remove these extra images from the source code as soon as possible?

    Thanks.

    #559455

    it-1760
    Participant

    The extra images are loading with code snippets like the one below, causing slower website speed. This occurs throughout the website, contributing to decreased performance and longer load times.

    https://we.tl/t-ZCxtibvZfp

    • This reply was modified 1 week, 4 days ago by it-1760.
    • This reply was modified 1 week, 4 days ago by it-1760.
    #559553

    Luke Nielsen
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand whether it is our theme issue?

    Best Regards.

    #559638

    it-1760
    Participant

    Hi,

    I’ve noticed that your theme is loading 4 to 5 images for each individual image, while other themes are loading just one. This is causing a significant impact on my client’s business, and I need a solution as soon as possible.

    If you check the source code at the URL below, you’ll see that it loads multiple images for every single one. I mentioned this problem in my previous message and shared screenshots, but it seems you missed them. Could you please address this issue urgently?

    URL: https://woodmart.xtemos.com/home/

    • This reply was modified 1 week, 3 days ago by it-1760.
    Attachments:
    You must be logged in to view attached files.
    #559758

    Luke Nielsen
    Keymaster

    Hello,

    Please add the below code to the functions.php file in your child theme. As a result, you will disable the “srcset” and you will have the same behavior as on the default theme.

    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');
    });

    Kind Regards

    #559776

    it-1760
    Participant

    Hi,

    I added your function, but it’s not working. The same images keep displaying, and nothing is getting disabled.

    Please take a look at the attached screenshot for clarification.

    Thanks.

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

    it-1760
    Participant

    Hi,

    Any update on this?

    Thanks.

    #560265

    Luke Nielsen
    Keymaster

    Hello,

    Remove the previous code and replace it with the below one:

    add_filter('max_srcset_image_width', function () {
    	return 1;
    });

    Clear the cache and recheck the issue.

    Kind Regards

Tagged: 

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