Skip to main content

Image handling utilities for Lektor.

Project description

lektor-imgutils is a plugin for the Lektor static site generator that manipulates image files and image-related markup after the build is completed.

To use the plugin, add it to your project:

lektor plugin add lektor-imgutils

The plugin can be configured using the configs/imgutils.ini file. Each section specifies a rule that will be applied to selected images. The section key is a CSS selector key which is used to select the image elements.

Examples

Set missing width and height attributes to all images:

[img]
size = intrinsic

Set lazy loading and async decoding on all images in the “.content” part:

[.content img]
loading = lazy
decoding = async

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lektor_imgutils-0.2.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

lektor_imgutils-0.2-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page