Attachmnet_fu can't keep original file image!


#1

I am currently trying to create an application on RoR and I am using
attachmne_fu plugin in order to handle image uploads.
I have also install ImageScience to create some thumbnails for the
images I upload

The problem is that I can upload images, but it resizes the original
image to the thumbnail version. I don’t know why.
For example if I upload an image say IMG_2455.jpg, in the directory
0000/0002 I have 2 files:
a) IMG_2455.jpg
b) IMG_2455_thumb.jpg

but the original image is also resized! so i have two images of 125x83
dimensions.
How can I keep the original image plus the thumbnail version ?
Here is my code in my model

class Photo < ActiveRecord::Base

belongs_to :user

has_attachment :content_type => :image,
:storage => :file_system,
:size => 1.byte…12.megabytes,
:thumbnails => { :thumb => ‘125x83>’ },
:path_prefix => “/public/photos/”

validates_as_attachment

end

Any suggestions ??


#2

Just out of curiousity, add a

:resize_to => ‘5000x5000>’,

before the thumbnails option. It should leave any image smaller than
5000x5000 alone. Obviously, this is an awfully ugly hack, but humor me,
and see if the presence of the resize_to option makes a difference.

I use ImageMagick and a

has_attachment :content_type => [‘image/jpeg’, ‘image/png’],
:storage => :file_system,
:max_size => 500.kilobytes,
:resize_to => ‘1600x1200>’,
:thumbnails => { :thumb => ‘100x100>’}

to resize any larger image to something that fits full screen on my
monitor, and the file system has the original, and a thumbnail, both
properly sized, even when the original is a 1024x768 image. Larger
images get sized down to 1600x1200.


#3

It may have nothing to do with your situation, but I once had a
similar experince when I forgot to install image magick…

but I think Ar’s advice will probably work

Cheers

Richard,