Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Jan 13, 2026

This pull request ensures that video embeds are only loaded when the field becomes visible, rather than when the page loads.

We can't just use loading="lazy" because it would load the iframes for video fields in collapsed Replicator sets, so I've had to use an intersection observer to detect when the embed element is actually visible (eg. no display: none on parent elements).

Related: #13385

@jasonvarga jasonvarga merged commit 0c0942a into master Jan 13, 2026
13 checks passed
@jasonvarga jasonvarga deleted the lazy-load-video-embeds branch January 13, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants