Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eleventy-plugin-auto-preload

npm npm GitHub stars Follow @nhoizey@mamot.fr

eleventy-plugin-auto-preload is a plugin for Eleventy that adds a preload for the first image with fetchpriority="high".

Installation

To install and use the plugin, install it as a dev dependency in your Eleventy project:

npm install eleventy-plugin-auto-preload --save-dev

And add this to .eleventy.js:

const autoPreload = require("eleventy-plugin-auto-preload");
eleventyConfig.addPlugin(autoPreload);

Usage

Make sure the largest image visible above the fold has a fetchpriority="high" attribute, so that the plugin adds a preload element in the <head> of the document, to improve image loading start time.

More information:

License

This project is licensed under the MIT License.

About

A plugin for Eleventy that adds a preload for the first image with fetchpriority="high"

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.