{{lazyload}} helper

Generate loading attribute with a specific value. Can be used with images and iframes to optimize page loading speed.

{{lazyload "VALUE"}}

Currently available values:

  • lazy - it will lead to load images during page scrolling
  • eager - it will prioritize loading of a specific image
  • auto - it will allow browser to decide about priority of loading a specific image

Example:

{{lazyload "lazy"}}

With this helper you can handle lazy loading settings:

{{lazyload @config.custom.lazyLoad}}

Read more how lazy load works in Publii.

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide