2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01:00
website/homepage/plugins/optimize_images
2020-02-08 14:10:50 +01:00
..
__init__.py add basic asset pipeline for pelican site 2019-08-30 13:08:06 +02:00
NOTICE conform to requirements caused by agpl licensed plugins 2020-02-08 14:10:50 +01:00
optimize_images.py add basic asset pipeline for pelican site 2019-08-30 13:08:06 +02:00
Readme.md add basic asset pipeline for pelican site 2019-08-30 13:08:06 +02:00

Optimize Images Plugin For Pelican

This plugin applies lossless compression on JPEG, PNG and SVG images, with no effect on image quality via jpegtran, OptiPNG and svgo respectively. The plugin assumes that all of these tools are installed, with associated executables available on the system path.

Installation

To enable, ensure that optimize_images.py is put somewhere that is accessible. Then use as follows by adding the following to your settings.py:

PLUGIN_PATH = 'path/to/pelican-plugins'
PLUGINS = ["optimize_images"]

PLUGIN_PATH can be a path relative to your settings file or an absolute path.

Usage

The plugin will activate and optimize images upon finalized signal of Pelican.