Simple Cloudinary data store for Dragonfly.
Add this line to your application's Gemfile:
gem 'dragonfly-cloudinary'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dragonfly-cloudinary
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.
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
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)