Skip to main content

Image converter for Foliant.

Project description


ImgConvert is a tool to convert images from an arbitrary format into PNG.


$ pip install foliantcontrib.imgconvert


To enable the preprocessor, add imgconvert to preprocessors section in the project config:

    - imgconvert

The preprocessor has a number of options with the following default values:

    - imgconvert:
        convert_path: convert
        cache_dir: !path .imgconvertcache
        image_width: 0
        formats: {}

convert_path : Path to convert binary. By default, it is assumed that you have this command in PATH. ImageMagick must be installed.

cache_dir : Directory to store processed images. They may be reused later.

image_width : Width of PNG images in pixels. By default (in case when the value is 0), the width of each image is set by ImageMagick automatically. Default behavior is recommended. If the width is given explicitly, file size may increase.

formats : Settings that apply to each format of source images.

The formats option may be used to define lists of targets for each format. If targets for a format are not specified explicitly, the preprocessor will be applied to all targets.


            - site
            - docx

Formats should be named in lowercase.

Project details

Release history Release notifications

Download files

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

Files for foliantcontrib.imgconvert, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size foliantcontrib.imgconvert-1.0.0-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size foliantcontrib.imgconvert-1.0.0.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page