Home / Forums / WoodMart support forum / WoodMart LCP setting is marked with the original JPG URL
Home › Forums › WoodMart support forum › WoodMart LCP setting is marked with the original JPG URL
WoodMart LCP setting is marked with the original JPG URL
- This topic has 6 replies, 2 voices, and was last updated 3 weeks, 5 days ago by
Artem Temos.
-
AuthorPosts
-
November 8, 2025 at 10:15 am #694929
chienfeiliuParticipantI use litspeed cache and QUIC CDN, LiteSpeed Cache (LSC) has enabled image optimization/WebP, I set woodmart Preload LCP Image on, but the WoodMart LCP setting is marked with the original JPG URL, The LCP metric still captures JPG, not the CDN/optimized WebP version。
When I run Pagespeed tests, images consistently fail to apply fetchpriority=high, and Webp image URLs persistently delay loading.
What should I do?
tanksNovember 9, 2025 at 5:39 pm #695038
chienfeiliuParticipantI enabled the WoodMart LCP option and disabled the image lazy loading feature, but PageSpeed still shows that this LCP image has a Resource load delay of 2,530 ms and that “fetchpriority=high should be applied.”
It also says the request is discoverable in the initial document. Why is this happening?Attachments:
You must be logged in to view attached files.November 10, 2025 at 11:46 am #695116
Artem TemosKeymasterHello,
Please provide us with your admin access so we can log in and check this on your end.
Thank you in advance.
November 10, 2025 at 11:54 am #695118
chienfeiliuParticipantok
November 10, 2025 at 3:35 pm #695169
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
add_filter('woodmart_get_webp_image_srcset', function ($url, $image_id) { if ( $url ) { $image_srcset_array = explode( ',', $url ); foreach ( $image_srcset_array as $key => $srcset_line ) { $srcset_line_array = explode( ' ', trim( $srcset_line ) ); if ( false === strpos( $srcset_line_array[0], '.webp' ) && woodmart_attachment_url_to_path( $srcset_line_array[0] . '.webp' ) ) { $srcset_line_array[0] = $srcset_line_array[0] . '.webp'; } $image_srcset_array[ $key ] = implode( ' ', $srcset_line_array ); } $url = implode( ',', $image_srcset_array ); } return $url; }, 10, 2); add_action('wp_head', function () { add_action('woodmart_get_image_src', 'wd_add_wepb_for_preload', 10); }, 1); add_action('wd_head', function () { remove_action('woodmart_get_image_src', 'wd_add_wepb_for_preload'); }, 10000); function wd_add_wepb_for_preload( $image_src ) { if ( false === strpos( $image_src, '.webp' ) && woodmart_attachment_url_to_path( $image_src . '.webp' ) ) { $image_src = $image_src . '.webp'; } return $image_src; }Kind Regards
November 10, 2025 at 4:23 pm #695185
chienfeiliuParticipantI’ve added the code and fixed part of the issue, but the images still have loading delays.
Attachments:
You must be logged in to view attached files.November 11, 2025 at 10:24 am #695297
Artem TemosKeymasterWe just analyzed your website, but don’t see any errors related to the LCP. Check the screenshot https://gyazo.com/a58c38adb85382252000cdb8926c517a
-
AuthorPosts
- You must be logged in to create new topics. Login / Register