Low commit activity in last 3 years
No release in over a year
Compress uploaded images for faster page loads and better SEO.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.4

Runtime

 Project Readme

Gem Version Ruby Style Guide Build

Camaleon Image Optimizer

This is a convenient image optimizer plugin for Camaleon CMS. Compressing images improves load times and thus SEO. It uses the image_optim gem under the hood. This gem contains multiple utilities for compressing GIF, JPEG, PNG, and SVG files. My experience has been that GIFs JPEGs are easily crushable with these tools, but using multiple PNG compressors is extremely slow. Thus, only one of the PNG compressors is enabled here.

Currently the only setting exposed by the plugin is max_quality, affecting JPEG and PNG images. Please note that setting this to the maximum will still result in some compression.

Installation

Add this line to your application's Gemfile:

gem 'camaleon_image_optimizer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install camaleon_image_optimizer

If you need support for compressing SVG files, install SVGO. Note that you need to do this on your production server, and you must first have NPM installed.

$ npm install -g svgo

If you instead install SVGO locally:

$ npm install svgo

or:

$ yarn add svgo

...then you must add this variable to your Production environment:

SVGO_BIN='node_modules/svgo/bin/svgo'

Usage

Just activate the plugin in Camaleon's admin panel.

Contributing

See CONTRIBUTING.md

License

The gem is available as open source under the terms of the MIT License.