Extend the Oembed converter to provide lazyload media embeds

Created on 16 March 2023, almost 2 years ago
Updated 10 April 2024, 9 months ago

Problem/Motivation

The filter "Converte Oembed tags to media embeds" render directly the HTML provided. This is a lack of performance because the resource is rendered without any control.

Proposed resolution

  • Give the option to render the Oembeds iframes with a facade and not load his content until the user interacts with it.
  • Create a submodule and extend de Embed class to alter the html
  • Use the OEmbed Lazyload services to render the iframe with facede
Feature request
Status

Needs review

Version

1.11

Component

Code

Created by

🇪🇸Spain frouco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @frouco
  • @frouco opened merge request.
  • Issue was unassigned.
  • Status changed to Needs work almost 2 years ago
  • 🇪🇸Spain frouco

    Here is an initial version to lazy load YouTube and Vimeo oembed videos, and a picture of the available options once the submodule is enabled.

  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India manikandank03 Tamil Nadu

    Patch update to support Drupal 10 and Deprecated function fix,

    Deprecated function: Creation of dynamic property Drupal\ckeditor_media_embed_oembed_lazyload\EmbedLazyLoad::$mediaConfig is deprecated in Drupal\ckeditor_media_embed_oembed_lazyload\EmbedLazyLoad->__construct() (line 96 of /mnt/www/html/solvaysf201np2/docroot/modules/contrib/ckeditor_media_embed/modules/ckeditor_media_embed_oembed_lazyload/src/EmbedLazyLoad.php)

Production build 0.71.5 2024