Path: | README.md |
Last Update: | Sat Feb 23 07:17:15 +0000 2019 |
[](https://travis-ci.org/markevans/dragonfly)
Hello!! Dragonfly is a highly customizable ruby gem for handling images and other attachments and is already in use on thousands of websites.
If you want to generate image thumbnails in Rails … ```ruby class User < ActiveRecord::Base # model
dragonfly_accessor :photo
end ``` ```erb <%= image_tag @user.photo.thumb(‘300x200#’).url if @user.photo_stored? # view %> ```
… or generate text images on-demand in Sinatra … ```ruby get "/:text" do |text|
Dragonfly.app.generate(:text, text, "font-size" => 32).to_response(env)
end ```
… or just generally manage attachments in your web app … ```ruby wav = Dragonfly.app.fetch_url("free.music/lard.wav") # GET from t‘interwebs mp3 = wav.to_mp3 # to_mp3 is a custom processor uid = mp3.store # store in the configured datastore, e.g. S3
url = Dragonfly.app.remote_url_for(uid) # ===> s3.amazon.com/my-stuff/lard.mp3 ```
… then Dragonfly is for you! See [the documentation](markevans.github.io/dragonfly) to get started!
Documentation
<a href="THE">markevans.github.io/dragonfly">THE MAIN DOCUMENTATION IS HERE!!!</strong></big></a>
<a href="RDoc">rubydoc.info/github/markevans/dragonfly/frames">RDoc documentation is here</a>
Installation
gem install dragonfly
or in your Gemfile ```ruby gem ‘dragonfly’, ’~> 1.1.5’ ```
Require with ```ruby require ‘dragonfly’ ``` Articles
See [the Articles wiki](github.com/markevans/dragonfly/wiki/Articles) for articles and tutorials.
Please feel free to contribute!!
Examples
See [the Wiki](github.com/markevans/dragonfly/wiki) and see the pages list for examples.
Please feel free to contribute!!
Plugins / add-ons
See [the Add-ons wiki](github.com/markevans/dragonfly/wiki/Dragonfly-add-ons).
Please feel free to contribute!!
Issues
Please use the <a href="github">github.com/markevans/dragonfly/issues">github issue tracker</a> if you have any issues.
Known Issues
There are known issues when using with json gem version 1.5.2 which can potentially cause an "incorrect sha" error for files with non-ascii characters in the name. Please see github.com/markevans/dragonfly/issues/387 for more information.
Suggestions/Questions
<a href="Google">groups.google.com/group/dragonfly-users">Google group dragonfly-users</a>
Ruby Versions
See [Travis-CI](travis-ci.org/markevans/dragonfly) for tested versions.
Upgrading from v0.9 to v1.0
Dragonfly has changed somewhat since version 0.9. See [the Upgrading wiki](github.com/markevans/dragonfly/wiki/Upgrading-from-0.9-to-1.0) for notes on changes, and feel free to add anything you come across while upgrading!
Changes are listed in [History.md](github.com/markevans/dragonfly/blob/master/History.md)
If for whatever reason you can‘t upgrade, then <a href="the">markevans.github.io/dragonfly/v0.9.15">the docs for version 0.9.x are here</a>.
Credits
[Mark Evans](github.com/markevans) (author) with awesome contributions from <a href="these">github.com/markevans/dragonfly/graphs/contributors">these guys</a>