Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Image resizing HTTP service
branch: master
Failed to load latest commit information.
config Update sample config.
lib Caching.
public Add /public.
test Pseudo-bundler FTW.
.gitignore Ignore /tmp. Update docs.
Rakefile Pseudo-bundler FTW.
resizer_service.gemspec Caching.

Image resizer service

A small image resizing proxy app


  • ImageMagick

    • OSX/Homebrew: brew install imagemagick
    • Ubuntu: sudo apt-get install imagemagick
  • Ruby 1.8+

    • OSX: You already have it
    • Ubuntu: sudo apt-get install ruby19
  • Some Ruby gems

    • (The app will alert you when you have missing Ruby gems.)


Start me like you would any Rack app.

$ rackup

Now request for an image this way:


..and the resizer service will grab your image and resize it for you.

Available parameters

These parameters have to be passed onto /image as GET parameters.

  • source
    (Required) The URL of the image to process.

  • resize
    (Required) Resizes the image in WIDTHxHEIGHT format. Both width and height are optional, but at least one has to be defined. Examples:

    • 500x200
    • 500x
    • x40

Optional parameters

  • format
    The image format you need it in. Can be any of the following:

    • png
    • jpg
    • gif
  • quality
    The JPEG quality level (defaults to 80). Has to be a number between 0 and 100.

  • rotate
    (Integer) The number of degrees to rotate the image in.

  • vflip
    When set to 1, flips the image vertically.

  • hflip
    When set to 1, flips the image horizontally.


This resizes to 200px width as a JPEG with 30% quality.



Inspired by, which this is (mostly) compatible with.

Something went wrong with that request. Please try again.