# Attachment\_fu doesnt resize photo and create thumbnails

**URL:** <https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075>\
**Category:** Rails\
**Created:** [March 17, 2009, 5:57am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075 "2009-03-17T05:57:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 5:57am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/1 "2009-03-17T05:57:03Z")

</div>

Hello,

I’m trying to use attachment\_fu in order to upload photo and create  
three versions of thumbnails (large small and medium). This works  
perfect of my mac book. but on my production server it uploads the image  
but doesn’t create three version of thumbnails!! I researched on the  
site and googled a bit, and tried couple of things suggested with no  
success.  
My server has Linux Debian on it (VPS)

## Here is what the photo model looks like:

class Photo \< ActiveRecord::Base  
belongs\_to :account, :foreign\_key =\> :account\_id  
belongs\_to :user, :foreign\_key =\> :user\_id

has\_attachment :content\_type =\> :image,  
:storage =\> :file\_system,  
:max\_size =\> 500.kilobytes,  
:resize\_to =\> ‘384x256\>’,  
:thumbnails =\> {  
:large =\> ‘150x150\>’,  
:medium =\> ‘64x64\>’,  
:small =\> ‘48x48\>’  
}

## validates\_as\_attachment #to prevent image sizes out of range from being saved end

I checked in the log files (production.log, mongrel.log and apache error  
log with no errors showing!) Any ideas how I can approach this problem.

Your help is appreciated.

Tam

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 6:25am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/2 "2009-03-17T06:25:49Z")

</div>

You should verify that your configured processor, such as rmagick/  
imagemagick, is installed and available to the user under which the  
application runs.

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 6:28am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/3 "2009-03-17T06:28:20Z")

</div>

you were right Eric I just figured out I had to execute this line as my  
RMagick was installed but not configured properly:

export LD\_LIBRARY\_PATH=/usr/local/lib

Now it works by making four versions of the photo but they are the same!  
I mean it doesn’t actually create different sizes of images. Any ideas??

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 8:27am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/4 "2009-03-17T08:27:48Z")

</div>

I realized that the problem was from RMagick/ImageMagick I tried  
installing different versions of both with no success.

I resolved the problem by using ImageScience/FreeImage instead. It seems  
to work better for me now!

Thanks,

Tam

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 10:09am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/5 "2009-03-17T10:09:59Z")

</div>

recently i have been hearing a lot of good about paperclip to replace  
attachment\_fu

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [March 17, 2009, 10:16am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-resize-photo-and-create-thumbnails/163075/6 "2009-03-17T10:16:25Z")

</div>

The thing is that even Paperclip would fail here, since it’s clearly  
related to RMagick. Paperclip uses the same library to scale its  
images. I prefer attachment\_fu over paperclip, it has a couple of  
features Paperclip doesn’t have and it has worked perfectly for me.  
The right tool for the right job.

On 17 Mar 2009, at 10:09, Wolas! wrote:

> recently i have been hearing a lot of good about paperclip to replace  
> attachment\_fu
> 
> On Mar 17, 8:27 am, Tam K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I realized that the problem was from RMagick/ImageMagick I tried  
> > installing different versions of both with no success.
> > 
> > I resolved the problem by using ImageScience/FreeImage instead. It  
> > seems  
> > to work better for me now!

Best regards

Peter De Berdt
