# node-social-image-resizer

> Resize images to fit multiple social platforms

Latest version **1.0.1** (published 2019-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-social-image-resizer
pnpm add node-social-image-resizer
yarn add node-social-image-resizer
bun add node-social-image-resizer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-01-30 |
| First published | 2019-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ragy96 |
| Keywords | Resize, Social, Image |

## Links

- npm: https://www.npmjs.com/package/node-social-image-resizer
- Homepage: https://github.com/ragrag/node-multilanguage-quotes
- npm.io page: https://npm.io/package/node-social-image-resizer

## Dependencies (1)

- [jimp](https://npm.io/package/jimp.md) ^0.6.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-01-30
- 1.0.0 — 2019-01-30

## README

# node-social-image-resizer

Resize images to fit multiple social platforms
Built on top of [jimp](https://www.npmjs.com/package/jimp)


## Getting started


To use it in `node.js` first install by:

```bash
npm install node-social-image-resizer --save
```

Then import it:

```js
const socialResize = require('node-social-image-resizer');
```




# Usage
## Example

```js
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
```bash
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)

---
_Source: https://npm.io/package/node-social-image-resizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
