Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

adie/dragonfly-cloudinary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dragonfly::Cloudinary

Gem Version Code Climate

Simple Cloudinary data store for Dragonfly.

Installation

Add this line to your application's Gemfile:

gem 'dragonfly-cloudinary'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dragonfly-cloudinary

Usage

Set up Cloudinary account, download your cloudinary.yml, and add this to your dragonfly initializer:

app = Dragonfly[:images]
app.datastore = Dragonfly::DataStorage::CloudinaryStore.new

You don't need to configure datastore itself, it will use your cloudinary settings.

Cloudinary urls

You can generate direct urls for stored image in cloudinary using image.remote_url. See Dragonfly documentation for this.

You can pass any options that cloudinary supports, e.g. image.remote_url(width: 100, height: 100, crop: :crop). See more at Cloudinary documentation

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Simple cloudinary data store for Dragonfly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages