I am trying to create a thumb with and uploaded image. I also want to resize the uploaded image to 672×378 and the thumb is should be 219×123.
The path for the thumb should be photographer/image/:id/thumb:Filename
I have installed imageshack (gem ‘Rmagick’) and intstalled the program on my pc.
My model:
has_attached_file :image,
:storage => :s3,
:bucket => 'mybucket',
:path => '/photographer/image/:id/:filename',
:s3_credentials => {
:access_key_id => 'mykey',
:secret_access_key => 'mykey'
}
It looks like you want to attach images to photographers. So in that case I would include this code on the photographer model.
Not that the
>after the size of the images will restrict the width from exceeding the value, but still keep the image in proportion. So, the image can’t go larger than the height or width. You can remove those if you want.