marcfilleul / image-processing-pipeline

An image build orchestrator for the modern web

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠ Maintenance notice

This project is inactively maintained.

It works, I use it for my personal projects, but the documentation is incomplete and I don't have the time to actively continue developing the project.

I am around to answer any questions in the discussions tab. Use at your own risk!


Image Processing Pipeline

An image build orchestrator for the modern web
Website Β»

Report Bug Β· Request Feature

npm   Code coverage   Node.js   Typescript   Make the web lighter

Image Processing Pipeline is a platform-agnostic modular collection of packages that aims to glue together various image libraries into and configurable automated pipeline.


Images make your websites pop, but they are also the largest asset that you serve to your client. Correctly optimising images provides a much better experience, by not wasting your visitors' bandwidth, battery and making the navigation of your website smoother.

At its highest level, Image Processing Pipeline is a command line tool that helps you automate your website's image build process in a non-destructive way, with speed and quality in mind. At a lower level, it is a modular set of functions that can be integrated into any existing backend service.

How it works

Image Processing Pipeline is built on top of three key concepts:

🌴 Pipeline

At the heart is a user-defined pipeline. A pipeline is a collection of pipes that can be assembled in any tree-like pattern, along with any additional options and an optional save key that will mark the pipe's output for export.

πŸ”¨ Pipe

Pipes are simple asynchronous functions that take a source image and output any number of formats. Pipes can apply any transformation to the source image, such as resizing, compressing or converting the image.

πŸ”– Metadata

Every image is accompanied by a metadata object, which is a collection of key-value pairs that describe the image. Pipes may modify an image's metadata object, which can later be used to customise the output filename or to create an image manifest file.


  • ⚑ Fast - Uses the amazing libvips image processing library
  • πŸ”₯ Parallel - Scales to any amount of available cores
  • πŸ’Ž Lanczos3 - Quality-first image down-scaling algorithm
  • πŸ“¦ Works out of the box - Uses a sane default configuration
  • 🌍 Universal - Designed to works anywhere without lock-in
  • βœ‚οΈ Cross-platform - Tested on Windows, macOS and Linux
  • 😊 Friendly - an easy to use CLI experience

Getting started


  • Node.js v10.8 or higher
  • npm


It is recommended to install IPP as a dependency of your project, this is just an example to quickly try it out

To give IPP a go on the command line, you will need to install the CLI package:

$ npm i -g @ipp/cli

This will add IPP to your path. Find a folder of images, and give it a go:

$ ipp -i folder/with/images -o output/folder


In order to get the most out of IPP you need to set up a configuration file with all of your persistent values. This can be in your package.json, or in a file named .ipprc, .ipprc.yml or .ipprc.json.

Then all you need to do is run ipp from the terminal!


# These will be the folders that will get processed,
# relative to the current working directory
input: folder/with/images
output: folder/with/images

# Remove this part to disable manifest generation
    p: path
    x: "hash:8"
    w: width
    h: height
    f: format
    p: path
    x: "hash:8"

# Here is where you customise the pipeline
# This is what the default pipeline looks like
  - pipe: resize
        - name: sm
            width: 480
        - name: md
            width: 720
        - name: lg
            width: 1920
        - name: xl
            width: 3840
    save: "[name]-[breakpoint][ext]"
      - pipe: convert
          format: webp
        save: "[name]-[breakpoint][ext]"

Ready for more?

Check out the website for complete documentation on how to use Image Processing Pipeline.


Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feat/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feat/AmazingFeature)
  5. Open a Pull Request


Distributed under the MIT License. See LICENSE for more information.

Built with ❀︎ by Marcus Cemes


An image build orchestrator for the modern web

License:MIT License


Language:TypeScript 95.4%Language:JavaScript 4.6%