Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Intersection Observer

142 sites Security covered
View on drupal.org

This module uses the Intersection Observer API to lazy load blocks and Views when they become visible in the viewport within modern browsers. For older browsers, it gracefully falls back to using the Blazy library for lazy loading.

Provides a simple integration with Intersection Observer API to lazyload blocks
and Views for modern browsers. Their contents will be lazy loaded once visible
on the view port. Will degrade gracefully to use bLazy to lazy load AJAX blocks
and Views for old browsers. Just be sure, bLazy library is left enabled.

Requirements

  • Blazy 3.0+ since IO 2.0+ for D9.4 to D11+.
  • Blazy 2.16+ since IO 1.5+ to have core/once compat for D8 to D10+.
  • IO Disconnect option being disabled.
  • block.html.twig which preserves container attributes and expects {{ content }} variables.

Recommended

  • Entity Browser
    To have Entity Browser with IO infinite pager via IO Browser sub-module, included
  • Ajaxin
    To have modern loading animations integrated with Blazy images and IO AJAX.

Installation

Install the module as usual, more info can be found on:

Installing Drupal 8 Modules

Usage / Configuration

Enable this module and its dependency, core Views and Blazy modules.

Enabling Intersection Observer API

  • Visit /admin/config/media/blazy
  • Expand Extra Settings option.
  • Fill out the fallback text for blocks under IO fallback.
  • Check Disable IO block if you don't need lazy-loaded blocks. IO main feature will then be only IO Views infinite pager. Available since 1.6.

As a block observer

Only available if Disable IO block is NOT checked:

  • Visit /admin/structure/block.
  • Edit one of the blocks.
  • Check Lazyload using Intersection Observer.

As a Views observer

  • Visit /admin/structure/views.
  • Edit one of the views.
  • Enable Use AJAX option under Advanced > Other.
  • Choose Intersection Observer under Pager.

Features

  • IO Entity Browser, since 1.6.
  • Lazyload ajaxified blocks on being intersected, optional since 1.6.
  • Lazyload ajaxified views on being intersected.
  • Supports static sites ala Tome for Views infinite pager since 1.2.

Known issues/ limitations

  • Slick Carousel with asNavFor is not synced. Should be fine without, though.
  • Only if any issue with IO Disconnect option, try disabling it. With a mix of Blazy images, IO block and pager observers, the IO must stand-by and be able to watch the next/ subsequent AJAX results. No expensive methods executed on being stand-by. Each item will be unobserved once loaded, instead.
  • Only works with `block.html.twig` which has variables.content `{{ content }}` printed directly like regular blocks. If no such variable, AJAX loses it own trigger (the link).
  • If you don't see the option Lazyload using Intersection Observer, it means it is internally excluded to declutter, for reasons: not worth to lazyload such as page title, or crucial content, etc. Or the region can be ajaxified entirely instead such as when using Ultimenu 2.x.

Activity

Total releases
2
First release
Oct 2025
Latest release
1 week ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
3.0.x-dev Dev Jul 6, 2026
2.0.3 Stable Oct 15, 2025