You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If multiple instances of the same selector exist, it selects the first instance without verifying whether it contains a background image.
As a result, the background image is not replaced with the variable, causing the image to load directly on page load instead of being lazy-loaded.
To Reproduce
Steps to reproduce the behavior:
Create a page with background images.
Create multiple instances of the same selector before the one with the background image, as shown in the example below.
Describe the bug
If multiple instances of the same selector exist, it selects the first instance without verifying whether it contains a background image.
As a result, the background image is not replaced with the variable, causing the image to load directly on page load instead of being lazy-loaded.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should detect the block containing the background image while ignoring the others.
Additional context
The issue is tracked in
/inc/Engine/Media/Lazyload/CSS/Subscriber.php
, specifically in thegenerate_content()
function.Printing the variable
$url_tags
show that the block is not the correct one.:The text was updated successfully, but these errors were encountered: