express component to scale and serve images from configurable storage backends
I am developing this software as part of a larger project, and will implement partially as needed.
Images are a pain. Often you want to request different versions of the same image, such as thumbnails and low-res previews, or cropped versions.
Most approaches resize image up-front on the local file system before uploading them to a CDN or storage like S3 or Manta. This is propably the most efficient way of handling image resizing.
This module trades efficiency over flexibility: rather than resizing images up-front, it resizes them on request. This gives you great flexibility, as adding a new image size does not require you to rescale all images at once.
While the intent is to support multiple storage backends, serving images trough node can be an advantage as you can control the exact url of the images. Splitting the module in a middleware component and a storage backend allows you to separate the image server from your main server when needed.
It is propably recommended to put a caching proxy or at least nginx in front of this, however, as serving images trough node is not as efficient.
Currently beta. My todo:
Have a look at the example app to see how this module integrates in express. For real live purposes you'll propably want to store image-serf in a singleton and use the same object everywhere.
var express = ;var app = ;app;var Serf = ;;