# Attachment\_fu reprocess thumbnails help

**URL:** <https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454>\
**Category:** Rails\
**Created:** [May 2, 2008, 9:02am UTC](https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454 "2008-05-02T09:02:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [May 2, 2008, 9:02am UTC](https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454/1 "2008-05-02T09:02:47Z")

</div>

hello guys

i am using attachment\_fu for product images  
i have hundreds of products and their images  
with thumbnails :thumbnails =\> { :thumb =\> ‘100x100\>’ }

now we have decided to have thumbnails of size 50x50\> only.

how do i destroy the existing thumbnails for images  
and regenerate the new thumbnails

i shud be doing something like this

product\_images.find(:all)  
for each prod image  
destroy the thumnnail. —what method  
create new thumbnail —what method  
end

pls help

jags

---

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [May 17, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454/2 "2008-05-17T22:14:47Z")

</div>

Jags R. wrote:

> hello guys
> 
> i am using attachment\_fu for product images  
> i have hundreds of products and their images  
> with thumbnails :thumbnails =\> { :thumb =\> ‘100x100\>’ }
> 
> now we have decided to have thumbnails of size 50x50\> only.
> 
> how do i destroy the existing thumbnails for images  
> and regenerate the new thumbnails
> 
> product\_images.find(:all)  
> for each prod image  
> destroy the thumnnail. —what method  
> create new thumbnail —what method  
> end

looks like substruct did something somewhat similar once:  
[http://code.google.com/p/substruct/source/browse/trunk/plugins/substruct/db/migrate/025\_user\_upload\_switch\_to\_attachment\_fu.rb](http://code.google.com/p/substruct/source/browse/trunk/plugins/substruct/db/migrate/025_user_upload_switch_to_attachment_fu.rb)

# creates a few on the fly
