Lazy loading iframe (Google Maps) from Elementor page builder
-
Lazy loading of frames seems not to work with Elementor 3.4.1 for Google Maps component .It worked just fine in previous versions.
The iframe in question never loads – there is no change in visibility after reaching the frame in the viewport. It seems to be picked by the plugin, as the css class changes to litespeed-loading, but it never completes.Iframe used is a Google Maps component from Elementor 3.4.1. If used with Elementor 3.3.x, lazy-loading works as expected.
There is a slight difference in generated iframe between those two Elementor versions.
For 3.3.1:
<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=London%20Eye%2C%20London%2C%20United%20Kingdom&t=m&z=10&output=embed&iwloc=near" title="%3$s" aria-label="%3$s"></iframe>
For 3.4.1:
<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=London%20Eye%2C%20London%2C%20United%20Kingdom&t=m&z=10&output=embed&iwloc=near" title="London Eye, London, United Kingdom" aria-label="London Eye, London, United Kingdom"></iframe>
The difference seem to be in title and aria-label attributes, but those shouldn’t impact the ability of the Litespeed cache plugin to process it correctly.Litespeed plugin version: 4.3.
For now, I switched to another plugin to have the iframe lazy-loaded and visible, therefore the issue won’t be reproducible on my main, production site. However, I replicated the issue on my dev env, with minimal setup, linked to this ticket.
Please let me know, whether this is something, that I should take with the Elementor support instead. However, since this is an issue with a feature, that’s not really supported by Elementor itself, I thought it makes more sense to reach out to the Litespeed team first. Also, I see nothing wrong with the code generated by Elementor for this particular iframe.
The page I need help with: [log in to see the link]
The topic ‘Lazy loading iframe (Google Maps) from Elementor page builder’ is closed to new replies.