teamlockr-s3-imagekit
v0.2.16
Published
[![npm version](https://badge.fury.io/js/teamlockr-s3-imagekit.svg)](https://badge.fury.io/js/teamlockr-s3-imagekit)
Downloads
45
Readme
TeamLockrS3ImageKit
S3 Image Kit for the TeamLockr platform
Developed by TeamLockr Dev Team
3 Simple Methods:
cropImage resizeFromUrl resizeImage
These three methods will crop and resize from S3 and create new images based on the parameters passed in.
High level view:
This app is used to resize images that are present remotely or locally, and then will upload them to the appropriate S3 bucket and objectPath.
Users of this app include the image profile picture handler that resizes uploaded profile pictures for performance benefits and also used by the media library to create various sizes e.g
medium
, large
, small
etc.
Requirements
To use the resizer, firstly make sure that you've installed either
imagemagick
or graphicsmagick
On OS X, you can do so by brew install imagemagick
Next
$ npm install gm
Functionality
It exposes a few functions:
- resizeFromUrl
- resizeImage
- resizeFromUrl: Takes in sizes, a sourceUrl, bucket, a key, as well the name that will be assigned to the downloaded and resized file when uploaded.
- Tip:
For more usage on
gm
you can checkout gm methods