remark-autogen-lazy
A simple Remark that automatically adds the loading="lazy" attribute to
tags within a specific directory, helping to improve website performance. This plugin is designed to improve web page performance by automatically deferring the loading of off-screen images. It traverses the Markdown Abstract Syntax Tree (AST) and injects loading="lazy" into the HTML properties of image nodes.
It is specifically built to work within a content structure (like blog posts) where you want most images to be lazy-loaded, but need to exclude critical, above-the-fold content like a hero image.
Tech Stack:
JavaScript Remark Unified unist-util-visit Node.js