iframes no longer lazy load after 3.6

Created on 3 June 2021, about 3 years ago
Updated 10 April 2024, 3 months ago

Problem/Motivation

I have an iframe in a block that lazy loaded correctly in 3.6. when I update to 3.7 - 3.10 it no longer lazy loads the iframe.

Here is the iframe code:

{%
  set classes = [
    'block',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {% block content %}
    <div class="marketing-block">
      <div class="cgi-rt">
        <iframe 
          width="560" 
          height="315"
          class="lazyload" 
          data-src="https://www.youtube.com/embed/..." 
          title="YouTube video player" 
          frameborder="0" 
          allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
          allowfullscreen>
        </iframe>
      </div>
    </div>
  {% endblock %}
</div>

Steps to reproduce

Update from 3.6 to anything between 3.7 - 3.10

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States labboy0276

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024