-
Notifications
You must be signed in to change notification settings - Fork 232
Open
wp-media/rocket-scripts
#67Labels
module: OCIOptimize Critical ImagesOptimize Critical Imagestype: enhancementImprovements that slightly enhance existing functionality and are fast to implementImprovements that slightly enhance existing functionality and are fast to implement
Description
Describe the bug
The Optimize critical images feature adds a preload tag for empty href values.
To Reproduce
Steps to reproduce the behavior:
- Go to https://neo.law/ or any site with a markup such as
<div style="background-image:url();"></div>as a markup for LCP element. - Run Optimize critical images on it.
- See the resulting preload markup:
<link rel="preload" data-rocket-preload as="image" href="" fetchpriority="high">
Expected behavior
Optimize critical images should avoid adding a preload tag in these conditions.
Screenshots
Original markup: https://jmp.sh/34iunv8H
Preload tag: https://jmp.sh/y6BkzWZq
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Ticket: https://secure.helpscout.net/conversation/2762969880/523284?viewId=273761
Slack thread: https://wp-media.slack.com/archives/C072P5EU5DF/p1731706632758679
Thanks!
Metadata
Metadata
Assignees
Labels
module: OCIOptimize Critical ImagesOptimize Critical Imagestype: enhancementImprovements that slightly enhance existing functionality and are fast to implementImprovements that slightly enhance existing functionality and are fast to implement