Command line script to optimize images for the web.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
squish
.gitignore
README.md
requirements.txt
setup.py
squish_r

README.md

squish

Requirements Status Build Status

Overview

Josh Benham's Image Optimization tool

A simple tool to optimize images for the web. Can use lossy and lossless optimizations or a combination of both.

Dependencies

Currently squish has two dependencies that will have to get installed seperately.

  1. imgmin to handle smart lossy image optimizations.
  2. image_optim to handle lossless image optimizations

Instructions

# grab the repo
$ git clone git@github.com:joshbenham/squish.git

# change into the squish directory
$ cd squish

# install python requirements
$ pip install --requirement requirements.txt

# symlink it to your bin directory
$ ln -s squish_r ~/bin/squish

Also make sure that your ~/bin directory is in your environment path.

Notes

In some versions of Ubuntu the pip install line fails because PIL cannot be installed correctly. You will need to follow link to get it working correctly.

Usage

Lossless compression

# on a file
$ squish_r --lossless file.jpg

# on a folder
$ squish_r --lossless folder/

Lossy compression

# on a file
$ squish_r --lossy file.jpg

# on a folder
$ squish_r --lossy folder/