Index: app/controllers/attachments_controller.rb
===================================================================
--- app/controllers/attachments_controller.rb	(revision 1339)
+++ app/controllers/attachments_controller.rb	(working copy)
@@ -21,14 +21,15 @@
 
   def download
     # images are sent inline
-    send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
+    send_file params[:thumb] ? @attachment.thumbfile : @attachment.diskfile, 
+                                    :filename => filename_for_content_disposition(@attachment.filename),
                                     :type => @attachment.content_type, 
                                     :disposition => (@attachment.image? ? 'inline' : 'attachment')
   rescue
     # in case the disk file was deleted
     render_404
   end
- 
+
 private
   def find_project
     @attachment = Attachment.find(params[:id])
Index: app/views/attachments/_links.rhtml
===================================================================
--- app/views/attachments/_links.rhtml	(revision 1339)
+++ app/views/attachments/_links.rhtml	(working copy)
@@ -1,6 +1,10 @@
 <div class="attachments">
-<% for attachment in attachments %>
-<p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' -%>
+<% attachments.each do |attachment| -%>
+<% if attachment.image? and File.exist?(attachment.thumbfile) -%>
+<p><%= link_to image_tag(url_for(:controller => :attachments,:action => :download,:thumb => 1,:id => attachment))+' '+attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment } -%>
+<% else -%>
+<p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %>
+<% end -%>
 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
   <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
   <% if options[:delete_url] %>
Index: app/models/attachment.rb
===================================================================
--- app/models/attachment.rb	(revision 1339)
+++ app/models/attachment.rb	(working copy)
@@ -51,6 +51,16 @@
     nil
   end
 
+  def make_thumbnail
+    img = Magick::Image.read(diskfile).first
+    thumb = img.thumbnail(75,75)
+    thumb.write thumbfile
+  end
+
+  def thumbfile
+    "#{File.dirname(diskfile)}/thumb_#{File.basename(diskfile)}"
+  end
+
   # Copy temp file to its final location
   def before_save
     if @temp_file && (@temp_file.size > 0)
@@ -59,6 +69,7 @@
         f.write(@temp_file.read)
       end
       self.digest = Digest::MD5.hexdigest(File.read(diskfile))
+			make_thumbnail if image? and Object.const_defined?(:Magick)
     end
     # Don't save the content type if it's longer than the authorized length
     if self.content_type && self.content_type.length > 255
