# Attachment\_fu not resizing

**URL:** <https://www.ruby-forum.com/t/attachment-fu-not-resizing/108150>\
**Category:** Rails\
**Created:** [June 29, 2007, 1:46pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-resizing/108150 "2007-06-29T13:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [June 29, 2007, 1:46pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-resizing/108150/1 "2007-06-29T13:46:41Z")

</div>

Hi there.

Im usig attachement\_fu for uploading my files to the site. I have  
followed in parts the guide at:  
[http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment\_fu-and-responds\_to\_parent](http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment_fu-and-responds_to_parent)  
It is creating the thumbnails ok, but it is not resizing them as it  
should.

I have used the following code:

* * *

has\_attachment :storage =\> :file\_system,  
:max\_size =\> 500.megabytes,  
:resize\_to =\> [300, 300],  
:thumbnails =\> { :thumb =\> [200, 200], :icon =\> [100,  
100], :tiny =\> [50, 50] },  
:processor =\> :MiniMagick, # attachment\_fu looks in  
this order: ImageScience, Rmagick, MiniMagick  
:path\_prefix =\> “/public/uploads/”

validates\_as\_attachment # ok two lines if you want to do validation, and  
why wouldn’t you?

* * *

I have also tried using it width :thumb =\> “200x200\>” this did not work  
wither. What am i doing wrong?

- Emil

---

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [June 29, 2007, 1:58pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-resizing/108150/2 "2007-06-29T13:58:44Z")

</div>

And another thing, it doesn’t save the width and height attributes into  
the database.

---

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [July 13, 2010, 5:03am UTC](https://www.ruby-forum.com/t/attachment-fu-not-resizing/108150/3 "2010-07-13T05:03:31Z")

</div>

Hi! I’ve the same problem. Could you fix it?
