Skip to content
Photo watermark/resize script
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Photo watermark/resize script

Script to batch add a SVG watermark to and/or resize JPG files.


  1. Copy the script and watermark.svg file in a local folder,
  2. (optional) Add to your $PATH environment variable to simplify usage.
  3. Edit or replace watermark.svg with your watermark*,
  4. Run script from the directory of the photos you want to process with the desired flags.

*Make sure to resize the svg to fit content (File > Document properties in Inkscape)


-s  Size of output image (<width>x<height>, <width>x, <height>y)
-w  SVG file to use as watermark
-a  Text to append to processed file names
-o  Output path of processed files (default='watermarker/')
-h  Shows this usage description
-x  Shows some usage examples


$ ./ -w my_watermark.svg -s 1080y -o ~/path_to_output/
$ ./ -w my_watermark.svg -o ~/path_to_output/
$ ./ -w my_watermark.svg -a "_watermarked"
$ ./ -s 1080x -o -a "_x1080" ~/path_to_output/
$ ./ -s 1080x1920


The shell script uses the following command line tools: convert and composite (ImageMagick), getopts.

Final words

If you find this useful or even adapt the script for other things you can show some love by starring this repo.

You can’t perform that action at this time.