0.0
No commit activity in last 3 years
No release in over 3 years
Lossless optimization for rails assets images
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Asset-Image-Opt

Local assets optimizer for Rails apps. It will use lossless compression on every jpeg/jpg and png files in app/assets/images directory and subdirecotires.

Compression efficiency is 5-15% for free and without quality loss.

Installation

This gem requires image processing utilities

Debian/Ubuntu

sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush

OSX

brew install advancecomp gifsicle jpegoptim jpeg optipng pngcrush

Rails

Add this line to your application's Gemfile:

gem 'asset-image-opt'

And then execute:

$ bundle

Usage

Execute:

bundle exec optimize_images

It will optimize all images in app/assets/images and subdirs.

TODO

  • Check if optipng and jpegoptim is present in the system, show instructions otherwise
  • Remove test_images from rspec and gem source

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request