Skip to content
Optimize rails assets using image_optim
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib rubocop 0.69.0 May 16, 2019
spec
.gitignore
.rubocop.yml
.travis.yml
Appraisals cleanup Appraisals and add rails 6 Dec 26, 2019
CHANGELOG.markdown
Gemfile
LICENSE.txt
README.markdown
image_optim_rails.gemspec

README.markdown

Gem Version Build Status Code Climate Depfu Inch CI

image_optim_rails

Optimize rails image assets using image_optim gem.

Options and instructions for getting binaries can be found in image_optim readme.

Installation

Add to your Gemfile:

gem 'image_optim_rails'

With image_optim_pack:

gem 'image_optim_rails'
gem 'image_optim_pack'

Usage

ImageOptim::Railtie will automatically register sprockets preprocessor unless you set config.assets.image_optim = false or config.assets.compress = false (later for partial rails 3 compatibility).

You can provide options for image_optim used for preprocessor through config:

config.assets.image_optim.nice = 20
config.assets.image_optim.svgo = false
config.assets.image_optim.gifsicle.careful = true

Or through config files config/image_optim.yml and config/image_optim/#{RAILS_ENV}.yml.

Caching is enabled by default in directory tmp/cache/image_optim.

Check all available options in options section of image_optim.

ChangeLog

In separate file CHANGELOG.markdown.

Copyright

Copyright (c) 2013-2019 Ivan Kuchin. See LICENSE.txt for details.

You can’t perform that action at this time.