Howto: rebuild thumbnails in attachment_fu

I've just added a new thumbnail definition to a class that has attachments using attachment_fu. Since this thumbnail definition didn't exist when I uploaded pior images, they don't have this thumbnail. I have been trying to figure out how to either load the image attachment and have it build the thumbnail. Does anyone know how to do this?

Thanks in advance.

Russell

Here's some example code from the Kete project (http://kete.net.nz):

http://github.com/kete/kete/blob/master/lib/tasks/tools.rake - starting at line 61

Cheers, Walter

I ran across this post while looking for a solution to the same problem. In the end, this worked for me in the attachment model class:

  # use attachment_fu protected methods to remake thumbs   def remake_thumbnails!     self.thumbnails.each {|thumb| thumb.destroy}     temp_file = create_temp_file     attachment_options[:thumbnails].each do |suffix, size|       self.create_or_update_thumbnail(temp_file, suffix, *size)     end   end

I use this in a rake task so I can rebuild all thumbnails when needed.

cheers, -foz