Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sprockets-image_compressor_holder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sprockets-image_compressor_holder

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Image compressor processor for Sprockets

Build Status

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!

Gotchas

If you have other sprockets processors registered for images, e.g. sprockets-webp, the relative order that they are required can matter. Please load sprockets-image_compressor before the others:

gem 'sprockets-image_compressor'
gem 'sprockets-webp'

See #15 for more information.

TODO

  • Provide configuration hooks
  • Test Railtie

Credits

  • @nhogle for help with compiling and packaging the jpegoptim and pngcrush binaries
  • @florentmorin for compatibility with sprockets-rails
  • @dkubb for compatibility with Rails 4

License

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

FAQs

Package last updated on 08 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc