Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

OEmbed Lazyload

The OEmbed Lazyload module aims to prevent the unnecessary loading of third party assets until such time that the user expresses interest in viewing the third party content.

This project was developed in order to help optimize projects that rely heavily on core media oembed content. Oembed on its own has the potential to load excessive third party assets even if a user has no intention of consuming the content.

For example, loading oembed content from YouTube can add nearly 750kB to what a user has to download on every page view.
Chrome developer tools showing that third party YouTube assets cost approximately 750 kilobytes

Installation

Installation instructions for the OEmbed Lazyload module

Configuration

Configuration instructions for the OEmbed Lazyload module

Extending

Developer documentation for extending the functionality of the OEmbed Lazyload module

Analytics Support

For the most part setting up analytics support for video embeds is outside of the scope of this module, however this documentation can help.

Extended autoplay support for youtube

By default, most mobile devices won't allow auto-play, leading to a double-tap being required to play videos.

Performance Metrics

A simple test of the impact that lazy-loading oembed content can have on page speed.

Guide maintainers

Luke.Leber's picture