LCP image isnot preloaded nor excluded from LL with certain markup
Describe the bug Using this page template, LCP isnot excluded from LL nor preloaded https://new.rocketlabsqa.ovh/lcp_picture_new2/
To Reproduce Steps to reproduce the behavior:
- install and activate wpr 1.18.1.4
- activate ll image
- visit the page template
- clear cache
- revisit the page template => lcp image isnot excluded from ll nor preloaded
Expected behavior lcp image is preloaded and excluded from ll
Additional context
- Related discussion https://wp-media.slack.com/archives/CUT7FLHF1/p1738762804801999
- for test: check the fix if the source was removed from page template (no regression happened with other picture templates) , check this page too https://new.rocketlabsqa.ovh/lcp_piccture_new/
- add the template to e2e
Slack link is : https://group-onecom.slack.com/archives/C08EFCYRQ2X/p1738762804801999
Issue is related to picture tags without sources
in lcp here: https://github.com/wp-media/wp-rocket/blob/a1bdab03c889b965cc55e7f8eb4d1cbaff5e83ff/inc/Engine/Media/AboveTheFold/Frontend/Controller.php#L359-L399 we add the img src into sources only if max-width is found in any source but without having sources at all, src will not be added.
@Mai-Saad Would it be possible to update the title of this issue to make it more descriptive of the problem, for better findablilty? Also The template links are not available so adding the relevant markup directly to the issue would also be really helpful for Support! Thanks!!
Related Ticket: https://secure.helpscout.net/conversation/3116736414/594688?viewId=377611