squirrelscan
GitHub

Offscreen Image Lazy Loading

Checks if offscreen images use lazy loading

Checks if offscreen images use lazy loading

Rule ID images/offscreen-lazy
Category Images
Scope Per-page
Severity warning
Weight 5/10

Solution

Add loading=‘lazy’ to images below the fold to defer loading until needed. This reduces initial page load time and saves bandwidth. Exception: Don’t lazy-load LCP image or above-the-fold content. Use loading=‘eager’ for critical images.

Options

This rule supports the following configuration options:

Option Type Default Description
above_fold_count unknown undefined Number of images considered above the fold

Configuration Example

[rules."images/offscreen-lazy"]
above_fold_count = undefined

Enable / Disable

Disable this rule

[rules]
disable = ["images/offscreen-lazy"]

Disable all Images rules

[rules]
disable = ["images/*"]

Enable only this rule

[rules]
enable = ["images/offscreen-lazy"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close