Node Jimp Watermark
Add watermark to images using NodeJS and Jimp
Visitor stats
Code stats
Usage
- Clone this repository
- Copy
.env.example
to.env
-
Set values to all environmental variables in the
.env
file:# 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
- Run
yarn start
- Profit
LICENSE
MIT
Connect with me: