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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file lektor_imgutils-0.2.tar.gz.

File metadata

  • Download URL: lektor_imgutils-0.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for lektor_imgutils-0.2.tar.gz
Algorithm Hash digest
SHA256 e77a3fcab2b20aaf610cde833e098ed7087e11a002b0bcb190992f4012d732c9
MD5 6509f1c440e6982e777f3fdeaf786de3
BLAKE2b-256 56c28495ef0bc967adfc7077372735d919362b5557820482b3ef18a3c6236f7c

See more details on using hashes here.

File details

Details for the file lektor_imgutils-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lektor_imgutils-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afa22db0c45e7c67657a174ef24f87592a455740322894f739178e40edfb34d5
MD5 78634d010e42379712a8243a099dbbe7
BLAKE2b-256 dcb4877e48867709ccb291ec6c301241bd6434397fc7417e58556b919937cb26

See more details on using hashes here.

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