#5539 - Scan for places we could use lazy loading

  • By
  • Added
  • 1 view
Identifier #5539
Issue type Feature request or suggestion
Title Scan for places we could use lazy loading
Status Open
Tags

Good for training (custom)

Roadmap: Over the horizon (custom)

Type: Performance (custom)

Handling member Deleted
Addon core
Description I just recently added lazy loading to images on theme image entries (e.g. theme image editor).

Find other places we could use lazy loading on images and other media when we do not immediately need the image to load and would prefer our deferred JavaScript loaded first.

For example, common theme-based images (backgrounds etc) should be eager loaded. But maybe user-submitted media (galleries, avatars, attachments, etc) can be lazy loaded. Icons could probably be lazy loaded as well except when using the compiled svg sprite file (though consider moving this to the very bottom of the DOM if possible so it loads after the JavaScript; the priority should be user interaction.)

Add a unit test that checks templates for explicit uses of img / audio / video / embed tags (double check on loading attribute compatibility) with a src pointing to uploads/* that do not have loading="lazy". I think for the most part anything from the uploads directory (and therefore not theme-based) should be lazy loaded.
Steps to reproduce

Related to

#3816 - Performance-centric image overhaul

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated