- crop, minify, and downsample images from the command line
- Clone this repo.
- Move to the repo in a terminal/iterm pane.
- Install packages by running the following in terminal/iterm from the repo:
brew install imagemagick
brew install graphicsmagick
npm install
- Add images you want to refine to the
/img
folder. - Open
gulpfile.js
in your texteditor of choice.
You'll see two tasks in gulpfile:
- Running
gulp resize
will resize all .jpgs in the img folder using the attributues specified. - Running
gulp tinyimg
will minify all images that have been resized using thehttps://tinyjpg.com/
api service.
Note: to use tinyimg, you will have to set up your own api key and replace api-key-here