New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-social-image-resizer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-social-image-resizer

Resize images to fit multiple social platforms

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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 = require('node-social-image-resizer');

Usage

Example

socialResize('./path/to/original.jpg','facebookProfile','./path/to/resized.jpg',0xFFFFFFFF)
.then(
    res => console.log(res) 
    //./path/to/resized.jpg
)
.catch( err => console.log(err));

parameters

socialResize(srcImgPath, socialPlatformType, destImgPath = srcImgPath, backgroundColor= 0x00000000)
  • 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)

Keywords

Resize

FAQs

Package last updated on 30 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts