Metadata-Version: 2.1
Name: lektor-imgutils
Version: 0.1
Summary: Image handling utilities for Lektor.
Author-email: "H. Turgut Uyar" <uyar@tekir.org>
License: Copyright 2023 H. Turgut Uyar <uyar@tekir.org>
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice,
           this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors
           may be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
        ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: repository, https://github.com/uyar/lektor-imgutils
Keywords: lektor,plugin,image,responsive,srcset,picture
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Lektor
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: ~=3.8
Description-Content-Type: text/x-rst
Provides-Extra: style
Provides-Extra: dev
License-File: LICENSE.txt

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.
Each section must have a "selector" key which is a CSS selector
to select the image elements.
The section names are insignificant.

Examples
--------

Set missing width and height attributes to all images::

  [default]
  selector = img
  size = yes

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

  [content]
  selector = .content img
  loading = lazy
  decoding = async
