No description
Find a file
2024-05-07 20:36:12 +03:00
tests Add test infrastructure 2024-05-07 20:36:12 +03:00
.gitignore Switch to pyproject.toml 2023-06-29 12:45:18 +03:00
CHANGES.rst Separate image ops from image data 2024-05-07 20:24:42 +03:00
lektor_imgutils.py Add test infrastructure 2024-05-07 20:36:12 +03:00
LICENSE.txt Update project metadata 2024-02-21 17:42:58 +03:00
pyproject.toml Add test infrastructure 2024-05-07 20:36:12 +03:00
README.rst Separate image ops from image data 2024-05-07 20:24:42 +03:00
requirements-dev.txt Add test infrastructure 2024-05-07 20:36:12 +03:00
requirements.txt Add test infrastructure 2024-05-07 20:36:12 +03:00

lektor-imgutils
===============

lektor-imgutils is a plugin for the `Lektor <https://www.getlektor.com>`_
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