`.
Thumbnails are automatically generated for images when the images are uploaded. By default, two sizes are made for use within the extension itself. These are "icon" 42px by 42px and "thumbnail" which is fit into 100px, maintaining its aspect ratio.
You can access sizes of image assets for various versions with the tags `` and ``.
Also, for vertical centering of images, you have the handy `` tag. Working example:
###Using Amazon s3
First, be sure you have the aws\-s3 gem installed.
gem install aws-s3
Everything works as before, but now if you want to add S3 support, you simply set the storage setting to "s3".
Radiant::Config[assets.storage] = "s3"
Then add 3 new settings with your Amazon credentials, either in the console or with the [Settings](http://github.com/Squeegy/radiant-settings/tree/master) extension:
Radiant::Config[assets.s3.bucket] = "my_supercool_bucket"
Radiant::Config[assets.s3.key] = "123456"
Radiant::Config[assets.s3.secret] = "123456789ABCDEF"
and finally the path you want to use within your bucket, which uses the same notation as the Paperclip plugin.
Radiant::Config[assets.path] = :class/:id/:basename_:style.:extension
The path setting, along with a new url
setting can be used with the file system to customize both the path and url of your assets.
### Migrating from the page_attachments extension
If you're moving from page_attachments to paperclipped, here's how to migrate smoothly:
First, remove or disable the page_attachments extension, and install the paperclipped extension.
For example:
rake ray:dis name=page_attachments
rake ray:assets
The migration has now copied your original `page_attachments` table to `old_page_attachments`.
rake radiant:extensions:paperclipped:migrate_from_page_attachments
This rake task will create paperclipped-style attachments for all `OldPageAttachments`. It will also ask you if you want to clean up the old table and thumbnails in `/public/page_attachments`.
Done!