https://github.com/davidcornu/thumbnailer
Generate a thumbnail of an image on the fly while you defer processing.
https://github.com/davidcornu/thumbnailer
Last synced: 8 months ago
JSON representation
Generate a thumbnail of an image on the fly while you defer processing.
- Host: GitHub
- URL: https://github.com/davidcornu/thumbnailer
- Owner: davidcornu
- Created: 2012-02-02T06:54:01.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-02-02T07:18:01.000Z (over 14 years ago)
- Last Synced: 2025-04-10T21:11:04.883Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 2.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Thumbnailer
## Description
After messing around with [CarrierWave](https://github.com/jnicklas/carrierwave) using [Rackspace CloudFiles](http://www.rackspace.com/cloud/cloud_hosting_products/files/) for storage, I toyed around with the idea of deferring image processing and transfer to speed things up for the user using something like [carrierwave_backgrounder](https://github.com/lardawge/carrierwave_backgrounder).
However, this solution would prevent users from seeing any thumbnails once their are done uploading, which is where something like this could help, serving a thumbnail or two to the user while processing and uploading takes place.
Inspired by
- https://github.com/xxx/fakeimage
- http://placehold.it
- http://dummyimage.com
## Requirements
Thumbnailer handles routing with [Sinatra](https://github.com/sinatra/sinatra), IO operations with [kgio](http://bogomips.org/kgio/) and image processing with [GraphicsMagick](http://www.graphicsmagick.org/).
## Installation
```
# Mac OS X
brew install graphicsmagick
# Debian/Ubuntu
apt-get install graphicsmagick
# Setup
git clone git@github.com:dcornu/Thumbnailer.git
cd Thumbnailer
gem install bundler
bundle install
bundle exec ruby app.rb
```
Place any images you would like to serve in /images.
You can now access them from `http://localhost:4567/image.jpg`.
You can specify the size you would like by passing `width` and `height` as params: `http://localhost:4567/image.jpg?width=200&height=200`.