Skip to content
Sprockets preprocessor to losslessly compress .png and .jpg images.
Ruby
Pull request Compare This branch is 6 commits ahead, 35 commits behind botandrose:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
lib
spec
.gitignore
CHANGELOG.md
Gemfile
README.md
Rakefile
sprockets-image_compressor.gemspec

README.md

Image compressor processor for Sprockets

Sprockets preprocessor to losslessly compress .png and .jpg images using pngcrush and jpegoptim.

Integration with Rails 3.1+

Just add this gem to your Gemfile:

gem 'sprockets-image_compressor'

The gem ships with a Railtie which will automatically register the compressor preprocessors.

Now with vendored binary fallbacks / Heroku support!

If the environment doesn't have pngcrush and/or jpegoptim installed, the gem will fall back on binaries packaged with the gem. Currently, only 32bit and 64bit linux binaries are included. Pull requests welcome for other architectures!

TODO

  • Provide configuration hooks
  • Test Railtie

Credits

  • Thanks to @nhogle for help with compiling and packaging the jpegoptim and pngcrush binaries

License

(MIT License) - Copyright (c) 2012 Micah Geisel

Something went wrong with that request. Please try again.