node package manager


Glues easyimage and knox for easily generating thumbnail images and uploading them to s3

MANICURE A Mongoose module for generating thumbnail images and storing them on s3.

Is it production ready? Certainly not. We don't even have tests yet. Yikes!

Install npm install manicure

ex. ...

These s3 options are exactly what you would pass directly to knox.

var s3options = { key: 'yours3key', secret: 'yours3secret', secure: false, port: 80 } var manicure = require('manicure')(s3options);

manicure.thumbs(GallerySchema, { sizes:[{name:'thumb', width:110, height:110}, {name:'medium', width:320, height:640, crop:false}], fieldPath:'pictures' });

through some magic this may also rotate images to a "proper" orientation if they originate from a device that embeds EXIF:Orientation property. This may help retain the same orientation shown in the camera viewfinder when an image is transfered to the server.

This adds a "generateThumbs" method that can be called on instances of Gallery that will generate the thumbs and push them up to s3.

In previous versions of this library, generateThumbs required a reference to the express request object (or anything that responded to "app.set") to retrieve the s3 settings. But now, that information is set when the module is required and thus generateThumbs can be called anywhere, even outside the context of a request.