node-social-image-resizer
Resize images to fit multiple social platforms Built on top of jimp
Getting started
To use it in node.js
first install by:
npm install node-social-image-resizer --save
Then import it:
const socialResize = ;
Usage
Example
;
parameters
socialResize
-
srcImgPath
: The path of the original image -
socialPlatformType
The platform type, types available: 'facebookProfile' 'facebookCover' 'twitterProfile' 'twitterHeader' 'instagramProfile' 'instagramPost' 'linkedinProfile' 'linkedinCover' 'pinterestProfile' 'youtubeProfile' 'youtubeCover' 'tumblrProfile' -
destImgPath
[String]: Destination image path (default = source image path) -
backgroundColor
[rgba hex]: (default is 0x00000000)