CamaleonLazyLoader

This plugin adds a loading="lazy" attribute to <img> and <iframe> tags rendered by Camaleon CMS.

  • This attribute will be added to tags on all server-rendered pages.
  • Existing loading attributes will not be overwritten, so you can still set individual tags to loading="eager" or loading="auto"

Usage

Just turn on the plugin in your admin settings.

Installation

Add this line to your application's Gemfile:

gem 'camaleon_lazy_loader'

And then execute:

$ bundle

Contributing

  • Fork the repo.
  • Make your changes and add tests as necessary.
  • Run standardrb to lint your code.
  • Submit a pull request.

License

The gem is available as open source under the terms of the MIT License.