node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป


Flamingo - Image processing server

Issues Build Status Dependency Status Code Climate documentation npm version MIT licensed

Flamingo is a simple, hapi based, HTTP server that allows you to convert media files to images. Internally it uses sharp, gm and ffmpeg to convert image and video files.


Flamingo uses jsdoc docs and tutorials for detailed usage information.



Flamingo provides a server and route class. In addition to that, there are a couple mixins that make it easy to add image conversion to routes. The default image conversion route is a route created by mixing ImageStream, ProfileOperation and Convert with the route class.

This allows for easy composition and creation of new functionality by overriding route hooks. See Tutorial: Basic usage and other documented tutorials on how to write your own, or modify existing routes. All custom image conversion routes should mix in Convert because it exposes enough hooks for most use-cases (If your use-case isn't implementable, open an issue).

Data is passed through the route in FlamingoOperation instances which hold request related metadata. Image data is transformed using node streams. This means flamingo can convert anything as long as it's available/transformable as image stream (i.e. a markdown string can be transformed to a html page which in turn allows the creation of a screenshot which can be streamed into flamingo).


Useful bunyan filters

  • only log memwatch stats or leaks bunyan -c 'this.msg === "stats" || this.msg === "leak"'