[wp-trac] [WordPress Trac] #50011: Edge case in image lazy-loading
WordPress Trac
noreply at wordpress.org
Sat Apr 25 20:40:32 UTC 2020
#50011: Edge case in image lazy-loading
---------------------------+-----------------------------
Reporter: superpoincare | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
In #44427 the feature to lazy load images by default was added.
The code uses regex and hence there are some edge cases which can
complicate.
One such case is adding
{{{
loading=lazy
}}}
with space before 'loading' in the alt value.
This can be done in the block-editor by selecting the image and adding the
above in:
Image settings > Alt text (alternative text) box
This is allowed in HTML.
When this is done, the regex thinks that the image tag has a lazy loading
attribute and doesn't add it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50011>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list