This Pelcan plugin optimized images (jpg and png).
Project description
Optimize Images is a plugin for Pelican, a static site generator written in Python.
Optimize Images applies lossless compression on JPEG and PNG images, with no effect on image quality. It uses [jpegtran][1] and [OptiPNG][2].
[1]: http://jpegclub.org/jpegtran/ “jpegtran” [2]: http://optipng.sourceforge.net/ “OptiPNG”
Installation
The easiest way to install Optimize Images is through the use of pip. This will also install the required Python dependencies automatically (currently none beyond Pelican itself).
pip install minchin.pelican.plugins.optimize_images
It is assumed both [jpegtran][1] and [OptiPNG][2] are installed on system path.
Then, in your pelicanconf.py file, add Optimize Images to your list of plugins:
PLUGINS = [
# ...
'minchin.pelican.plugins.optimize_images',
# ...
]
Requirements
Optimize Images depends on (and is really only useful with) Pelican. This can be manually installed with pip:
pip install pelican
It is assumed both [jpegtran][1] and [OptiPNG][2] are installed on system path. On Windows, installers are available at each respective website. On Ubuntu systems, the two can be installed via apt-get.
apt-get install optipng libjpeg-progs
Configuration and Usage
The plugin will activate and optimize images upon finalized signal of pelican.
The plugin has no user settings.
Credits
Original plugin from the Pelican-Plugins repo.
License
The plugin code is assumed to be under the AGPLv3 license (this is the license of the Pelican-Plugins repo).
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
Built Distribution
Hashes for minchin.pelican.plugins.optimize_images-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e0bf96e49f83ee6851025561e61cfbc2fe5812a636571107832b5a16089dab2 |
|
MD5 | 93f4c240f0477a0efb8bb619c78b0312 |
|
BLAKE2b-256 | fcfc3e5e28100684ca7411e586168cb617e2be8d58d786441a171992b510229a |
Hashes for minchin.pelican.plugins.optimize_images-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8268bab29aec9287fe3d7611324c66715d417159e3b12f54920200b3c8cc3c67 |
|
MD5 | 50b76675477ad40e412580c1f3573177 |
|
BLAKE2b-256 | 1db3c4a4372dd5d01125df40328143a6a54038509ee4df7176daedee67f677ac |