Paperclipped Extension

jirogit edited this page Sep 6, 2011 · 7 revisions

Installation

ImageMagick

To find out if your system has ImageMagick available run which convert, if you see a path returned you’re ready, if not use your system’s package manager to get a copy. Any modern GNU/Linux distribution should have an ImageMagick package available and MacPorts has one for Mac users.

Settings

The Settings extension is optional, but recommended if you’d like an easy interface for setting Paperclipped options.

./script/extension install settings

(If this fails see the manual installation instructions)

Paperclipped

./script/extension install paperclipped

(If this fails see the manual installation instructions)

Then you need to install and require the ImageSize gem.

sudo gem install imagesize

Then open your config/environment.rb file and add

config.gem 'imagesize', :lib => 'image_size'

inside the Radiant::Initializer.run block.

rake production db:migrate:extensions
rake production radiant:extensions:paperclipped:update

Then restart your application server.

Configuration Options

Note: While you may use Settings extension, you can of course also set these using the console or by editing environment.rb, see: Customizing the Admin UI.

Radiant::Config["assets.additional_thumbnails"] #default: 'normal=normal=640x640>'
Radiant::Config["assets.storage"]
Radiant::Config["assets.s3.key"]
Radiant::Config["assets.s3.secret"]
Radiant::Config["assets.s3.bucket"]
Radiant::Config["assets.s3.url"]
Radiant::Config["assets.s3.path"]
Radiant::Config["assets.content_types"] #default: 'image/jpeg, image/pjpeg, image/gif, image/png, image/x-png, image/jpg, video/x-m4v, video/quicktime, application/x-shockwave-flash, audio/mpeg, video/mpeg;
Radiant::Config["assets.display_size"] #default: 'original'
Radiant::Config["assets.skip_filetype_validation"] #default: true
Radiant::Config["assets.max_asset_size"] #default: 5

Usage

Check the Paperclipped README for usage details.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.