Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

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 and 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 and OptiPNG 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 and OptiPNG are installed on system path. On Windows, installers are available at each respective website. On Ubuntu systems (including Travis-CI), 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.

Known Issues

Image manipulation like this can take some time to run. You may consider only adding this plugin to your publishconf.py (rather than your base pelicanconf.py), which will then only run this image optimization in preparation for site publication.

An issue, as such, is that there is no formal test suite. Testing is currently limited to my in-use observations. I also run a basic check upon uploaded the package to PyPI that it can be downloaded and loaded into Python.

The package is tested in Python 3.6; compatibility with other version of Python is unknown, but there should be nothing particular keeping it from working with other “modern” versions of Python.

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

Release History

Release History

This version
History Node

1.1.1

History Node

1.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
minchin.pelican.plugins.optimize_images-1.1.1-py3-none-any.whl (7.3 kB) Copy SHA256 Checksum SHA256 py3 Wheel Apr 17, 2017
minchin.pelican.plugins.optimize_images-1.1.1.tar.gz (17.5 kB) Copy SHA256 Checksum SHA256 Source Apr 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting