# Automatic thumbnail generation?

**URL:** <https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945>\
**Category:** Radiant CMS\
**Created:** [August 4, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945 "2008-08-04T16:08:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [August 4, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945/1 "2008-08-04T16:08:13Z")

</div>

Hi All,

Ie$B!Fe(Bd like the ability to generate thumbnails of images  
automatically, for example to create thumbnails for a list view of  
photo articles. Maybe something like a tag to call the image where I  
can specify attributes for:

- resize longest image dimension to x pixels
- resizes to whole pixels on both dimensions
- crop to square
- ability to set class based on landscape or portrait
- ability to populate img tage$B!Ge(Bs width and height
- generates a thumbnail with either .thumb.jpg or .80x80.jpg (or  
whatever the format is) suffix
- doesne$B!Ge(Bt make thumbnails that look like ass

Does anything out there do this? If not is anyone interested in  
writing an extension (or adding this functionality to an existing  
extension) to do this? Ie$B!Ge(Bve heard that fleximage is apparently  
pretty nice, but what do I know eh.

Thanks for your time

peace - oli

---

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [August 4, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945/2 "2008-08-04T19:08:19Z")

</div>

Oli,

I believe that some of the features you want can be found here

> **[GitHub - radiant/radiant-page-attachments-extension: An extension for Radiant...](https://github.com/radiant/radiant-page-attachments-extension/tree/master)**
>
> master

or [GitHub - kbingman/paperclipped: Please note, this extension is no longer being developed. Please take a look at the radiant-clipped-extension instead. Radiant extension for managing assets and images with the Paperclip plugin.](http://github.com/kbingman/paperclipped/tree/master)

One could start with either of those and add your missing features,  
but I don’t know of any extensions out there to do what you want.

-Jim

---

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [August 4, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945/3 "2008-08-04T16:49:18Z")

</div>

attachment\_fu , a rails plugin, handles this well.

Kunal

---

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [August 4, 2008, 10:55pm UTC](https://www.ruby-forum.com/t/automatic-thumbnail-generation/144945/4 "2008-08-04T22:55:54Z")

</div>

Oli,

paperclipped definitely does about 80% of this. Importantly it makes  
very good looking thumbnails and you can customize the crop and size.  
It also does not require rmagick, so it is a bit lighter weight on  
RAM. I have been recently doing some drag and drop work as well, when  
you drag an image into a page part, the correct tag is generated. This  
is not in the trunk version, but should be there in a day or two.

It is based on Thoughbot’s Paperclip plugin, which for me is a bit  
nicer than attachment\_fu, but both have their place.

If you don’t need all of these features, page\_attachments is also a  
very usuable choice. I have often used it when I need a lighter weight  
solution.

If you do try out paperclipped, let me know if you need any help, the  
documentation is, um, sparse…

Keith
