node.js - Image manipulation with SailsJS -


Did anyone create a seal app for uploading different sizes of images with Captain-S3 and Image Manipher Library is?

For example, if a user uploads a user profile image, then three different sizes of images will be uploaded to the S3 server. Any help will be very much appreciated.

Cheers

You can use SW to resize before uploadng Such as:

  var resBuff = imagemagick.convert ({srcData: originalBuffer, width: X, // Dimensions in height of pixels: Y, to resize: "aspectfill", quality : 80, format: 'JPEG'});  

resBuff object can now be uploaded as sized image on s3.


Comments