docsifyjs / docsifyjs/docsify

Support browser-level lazy-loading for images

Open
#1,431 2 comments 1 reaction 1 assignee Claimed by @jhildenbiddle View on GitHub
enhancement
Dominant language
JavaScript
Stars
31.5k
Forks
5.8k
Avg merge
9d 8h
Merged PRs (30d)
2

Description

## Feature request
Support lazy-loading images
Reference: https://web.dev/browser-level-image-lazy-loading/

#### What problem does this feature solve?

For pages with many images, instead of loading all the images, using lazy-loading will allow the browser fetch images on demand.

#### What does the proposed API look like?
I think we can expose an lazy loading option, or enable it by default.

#### How should this be implemented in your opinion?
Add `loading=lazy` to `img` tags.

#### Are you willing to work on this yourself?
Not sure where to change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.