Home › Forums › WoodMart support forum › Extra Images Loading in Theme.
Extra Images Loading in Theme.
- This topic has 7 replies, 2 voices, and was last updated 7 months, 3 weeks ago by Luke Nielsen.
-
AuthorPosts
-
April 22, 2024 at 2:20 pm #559453
it-1760ParticipantHi,
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.
April 22, 2024 at 2:22 pm #559455
it-1760ParticipantThe 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.
April 22, 2024 at 5:57 pm #559553
Luke NielsenKeymasterHello,
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.
April 23, 2024 at 7:52 am #559638
it-1760ParticipantHi,
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 7 months, 3 weeks ago by it-1760.
Attachments:
You must be logged in to view attached files.April 23, 2024 at 11:39 am #559758
Luke NielsenKeymasterHello,
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
April 23, 2024 at 12:02 pm #559776
it-1760ParticipantHi,
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.April 24, 2024 at 2:02 pm #560250
it-1760ParticipantHi,
Any update on this?
Thanks.
April 24, 2024 at 2:29 pm #560265
Luke NielsenKeymasterHello,
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
-
AuthorPosts
Tagged: Extra Image
- You must be logged in to create new topics. Login / Register