Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 982 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 982 Bytes

grunt-wresizer

Resize, watermark and optimize images like a pro

Installation

  1. Clone or download and unpack to desired location
  2. Download and install latest version of node.js
  3. Install grunt-cli globally: npm install -g grunt-cli
  4. Install GraphicsMagick (recommended) or ImageMagick for your OS.
  5. Get your TinyPNG API key and set it as your environment variable:
  • set TINYPNG_API_KEY=YOUR_API_KEY_HERE for Windows
  • export TINYPNG_API_KEY=YOUR_API_KEY_HERE for Linux
  1. Install project dependencies: npm install
  2. Put your watermark image in source/watermark/ as logo.png
  3. Configurate grunt-gm task

How to use

  • grunt — clean, resize and watermark images
  • grunt tinypng — compress images with tynypng
  • grunt build — all operations
  • grunt serve — watch