Can Leaflet (View) be lazy-loaded?

Created on 22 March 2023, about 2 years ago
Updated 27 June 2024, 9 months ago

Problem/Motivation

Having a look at Google Pagespeed Insights (https://pagespeed.web.dev/) on a page where leaflet (views) is used (with OSM source), pagespeed complains the different parts of the map (images) should be lazy-loaded.

This doesn't seem simple, but I'd like to ask, if there's already a setting or functionality to allow lazy-loading the whole container or the map, when it gets into the viewport.

Please make this a feature-request, if this is not yet possible and the maintainers think it's not a bad idea.
It might be implemented using Intersection Observer, if no general solution is possible.

Steps to reproduce

Proposed resolution

- [ ] Add Lazy Load option
- [ ] If enabled, make the map wrapper lazy-loaded by using intersection observer

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

10.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.71.5 2024