What this solution does
The module automatically defers the loading of all iframe elements and images using the browser's native mechanism. This ensures rapid initialization, full support for multisite configurations, and flexible parameter settings. The module's high performance positively impacts SEO by enabling correct indexing of images.
Available settings include enabling or disabling deferred loading for iframes and for images within img tags. Users can also select the operating mode: global or component.
In global mode, the module automatically locates all iframe and img instances on the page and applies deferred loading to them. This method operates without code intervention but consumes more resources due to the processing of a larger data volume.
In component mode, the module functions only within specific components. Its operation requires manual integration into the necessary components. This approach demands code modifications but ensures efficient caching and minimal resource consumption.
The technical implementation relies on the use of the loading attribute. Browser compatibility aligns with the data provided in caniuse.
If “Lazy loading of all iframes and images. Native.” fits the task, General iT can install the module, configure it and verify the result in the project.