Geo
Geo

Reputation: 96957

Creating both style images using paperclip

I just started using the paperclip plugin. I managed to make it work with a normal file field. From Ryan Bates's screencast, I saw that you cannot have a thumbnail image, unless you resize it explicititly at upload time. However, I would like to have both a normal image, and a thumbnail image of the same picture. How would I accomplish this?

Upvotes: 0

Views: 194

Answers (1)

Sergey K
Sergey K

Reputation: 5107

You can create several styles like

:styles => { :normal=> "1024x768>", :thumb => "100x100>" }

for exapmle

Then you can use in your view

<%= image_tag imageable.image.url(:normal) %>

where imaageable is an object which you have attached an image to

Upvotes: 1

Related Questions