## Loading Behavior

Product: Lazyline – Innovative Lazy-Load & LQIP WordPress Plugin
URL: https://hub.jkdevstudio.com/docs/lazyline/settings-reference/loading-behavior
Updated: 2026-09-06
Summary: When and how lazy loading triggers — viewport threshold distance, load delay, fade-in transition speed, and scroll direction detection.

These settings control when and how lazy loading triggers. Getting the viewport threshold right is the most impactful thing you can tune for Core Web Vitals.

<figure class="doc-figure" data-align="center"><img src="https://hub.jkdevstudio.com/storage/docs/2026/04/f2b7b271-7dbe-491e-9356-5fd5459502d3.webp" alt="" class="doc-image rounded-xl max-w-full"></figure>

## Core Settings

<table style="min-width:75px;"><colgroup><col style="min-width:25px;"><col style="min-width:25px;"><col style="min-width:25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>Description</p></th><th colspan="1" rowspan="1"><p>Default</p></th></tr><tr><td colspan="1" rowspan="1"><p>Viewport Threshold</p></td><td colspan="1" rowspan="1"><p>Distance in pixels from the viewport edge at which loading starts. Higher values preload earlier</p></td><td colspan="1" rowspan="1"><p><code>300px</code></p></td></tr><tr><td colspan="1" rowspan="1"><p>Native Lazy Loading</p></td><td colspan="1" rowspan="1"><p>Use the browser built-in <code>loading="lazy"</code> attribute instead of JavaScript. Faster but less control</p></td><td colspan="1" rowspan="1"><p>Off</p></td></tr><tr><td colspan="1" rowspan="1"><p>Cancel on Exit</p></td><td colspan="1" rowspan="1"><p>If an element leaves the viewport before loading completes, cancel the request. Saves bandwidth on fast scrolling</p></td><td colspan="1" rowspan="1"><p>On</p></td></tr><tr><td colspan="1" rowspan="1"><p>Frontend Watcher</p></td><td colspan="1" rowspan="1"><p>Monitors AJAX content changes and applies lazy loading to dynamically added elements</p></td><td colspan="1" rowspan="1"><p>On</p></td></tr><tr><td colspan="1" rowspan="1"><p>Back to Default</p></td><td colspan="1" rowspan="1"><p>After an image loads, unwrap the <code>.lazyline-wrapper</code> div and restore the original HTML structure</p></td><td colspan="1" rowspan="1"><p>On</p></td></tr></tbody></table>

<div data-callout="tip">

**Viewport Threshold** of `300px` works well for most sites. Drop it to `100-150px` for more aggressive lazy loading (images load closer to when they're actually visible). Increase it if images sometimes appear blank after fast scrolling.

</div>

<div data-callout="info">

**Native Lazy Loading** is the simplest option - no JavaScript, no wrapper elements - but it disables LQIP placeholders and preloader animations. Use it if you don't need those features and want the lowest possible overhead.

</div>

<div data-callout="info">

**Frontend Watcher** is essential if your site uses infinite scroll, AJAX-loaded tabs, or any dynamic content. It re-applies lazy loading to any new elements added to the page after initial load.

</div>

## Dev Mode

Enable **Dev Mode** to stream lazy load events to the browser console - useful when diagnosing why specific images aren't loading:

- `ENTERED` - element entered the viewport
- `LOADING` - load started
- `LOADED` - load completed successfully
- `ERROR` - load failed
- `CANCEL` - load cancelled (element left viewport before loading finished)

<div data-callout="tip">

Disable Dev Mode in production - it adds console output on every image load and is only intended for debugging.

</div>