An open API service indexing awesome lists of open source software.

https://github.com/scriptex/node-jimp-watermark

Add watermark on images using NodeJS and Jimp
https://github.com/scriptex/node-jimp-watermark

jimp nodejs-image-manipulation watermark watermark-image

Last synced: 3 months ago
JSON representation

Add watermark on images using NodeJS and Jimp

Awesome Lists containing this project

README

          

[![Github Build](https://github.com/scriptex/node-jimp-watermark/workflows/Build/badge.svg)](https://github.com/scriptex/node-jimp-watermark/actions?query=workflow%3ABuild)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/34d3d75710534dc6a38c3584a1dcd068)](https://www.codacy.com/gh/scriptex/node-jimp-watermark/dashboard?utm_source=github.com&utm_medium=referral&utm_content=scriptex/node-jimp-watermark&utm_campaign=Badge_Grade)
[![Codebeat Badge](https://codebeat.co/badges/d765a4c8-2c0e-44f2-89c3-fa364fdc14e6)](https://codebeat.co/projects/github-com-scriptex-node-jimp-watermark-master)
[![CodeFactor Badge](https://www.codefactor.io/repository/github/scriptex/node-jimp-watermark/badge)](https://www.codefactor.io/repository/github/scriptex/node-jimp-watermark)
[![DeepScan grade](https://deepscan.io/api/teams/3574/projects/5257/branches/40799/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3574&pid=5257&bid=40799)
[![Analytics](https://ga-beacon-361907.ew.r.appspot.com/UA-83446952-1/github.com/scriptex/node-jimp-watermark/README.md?pixel)](https://github.com/scriptex/node-jimp-watermark/)

# Node Jimp Watermark

> Add watermark to images using NodeJS and Jimp

## Visitor stats

![GitHub stars](https://img.shields.io/github/stars/scriptex/node-jimp-watermark?style=social)
![GitHub forks](https://img.shields.io/github/forks/scriptex/node-jimp-watermark?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/scriptex/node-jimp-watermark?style=social)
![GitHub followers](https://img.shields.io/github/followers/scriptex?style=social)

## Code stats

![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/scriptex/node-jimp-watermark)
![GitHub repo size](https://img.shields.io/github/repo-size/scriptex/node-jimp-watermark?style=plastic)
![GitHub language count](https://img.shields.io/github/languages/count/scriptex/node-jimp-watermark?style=plastic)
![GitHub top language](https://img.shields.io/github/languages/top/scriptex/node-jimp-watermark?style=plastic)
![GitHub last commit](https://img.shields.io/github/last-commit/scriptex/node-jimp-watermark?style=plastic)

## Usage

1. Clone [this repository](https://github.com/scriptex/node-jimp-watermark)
2. Copy `.env.example` to `.env`
3. Set values to all environmental variables in the `.env` file:

```sh
# Turns on/off console logging
WATERMARK_DEBUG=true

# Absolute path to the file which will be used as a watermark
WATERMARK_IMAGE=/Users/user/projects/icon.png

# Absolute path to the folder containing the images
WATERMARK_IMAGES=/Users/user/projects/images

# Spacing between the watermark and the image edges
# in percentage (from 0 to 100)
WATERMARK_SPACING=2

# Opacity of the watermark when placed over the image
WATERMARK_OPACITY=0.5

# Ratio in percentage (from 0 to 100) relative to
# the watermarked image which is used to resize
# the watermark if the watermark is larger
WATERMARK_RESIZE_RATIO=10

# The position of the watermark.
# Possible values are:
# N (north),
# NE (northeast),
# E (east),
# SE (southeast),
# S (south),
# SW (southwest),
# W (west),
# NW (northwest),
# C (center)
WATERMARK_POSITION=SE

# A pipe split words which shouldn't be found in the images file names
WATERMARK_IGNORE=logo|icon|banner|unsplash|placeholder
```

4. Run `yarn start`
5. Profit

## LICENSE

MIT

---


Connect with me:






 



 



 



 



 



 



 



 



 



 



 



---


Support and sponsor my work: