Ruby Build Status

A Ruby gem for building imgix URLs.

More examples and additional documentation for the Ruby library can be found on GitHub at: https://github.com/imgix/imgix-rb.

Example

client = Imgix::Client.new(host: 'your-subdomain.imgix.net', token: 'your-token', secure: true)
client.sign_path('/images/demo.png?w=200')
#=> https://your-subdomain.imgix.net/images/demo.png?w=200&s=2eadddacaa9bba4b88900d245f03f51e

# OR
client.path('/images/demo.png').to_url(w: 200)

# OR
path = client.path('/images/demo.png')
path.width = 200
path.to_url

# OR
client.path('/images/demo.png').width(200).height(300).to_url

# Some other tricks
path.defaults.width(300).to_url # Resets parameters
path.rect(x: 0, y: 50, width: 200, height: 300).to_url # Rect helper

More Client Libraries