0.0
No commit activity in last 3 years
No release in over 3 years
Tiny rack middleware for image resizing.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

light-resizer

Build Status

Rack middleware for image resizer. Can be integrated with CarrierWave. Instalation

Install gem:

$ gem install light_resizer

And set it in config:

config.middleware.insert_before(Rack::Sendfile, LightResizer::Middleware, Rails.root)

Usage

For example we have image in public folder by next url:

example.com/images/kitten.jpg

Url of resized image will be:

example.com/images/light_resize/100x150/kitten.jpg

light_resizer will find /public/images/kitten.jpg and create light_resize with resized to size of 100x150px image.

Default resize doesn't crop image and fill new space with transparent background.

To crop image use 'crop' in url:

example.com/images/light_resize/crop/100x150/kitten.png