# Cropped thumbnails with ImageScience

**URL:** <https://www.ruby-forum.com/t/cropped-thumbnails-with-imagescience/164275>\
**Category:** Rails\
**Created:** [March 30, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/cropped-thumbnails-with-imagescience/164275 "2009-03-30T21:13:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f05b48/32.png) [@demec](https://www.ruby-forum.com/u/demec)\
**Post date:** [March 30, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/cropped-thumbnails-with-imagescience/164275/1 "2009-03-30T21:13:05Z")

</div>

I have a Photo model (below) and as you can see I create some  
thumbnails. However I want to create a proportionally thymbnail, which  
basically will be a cropped version, so that the thumbnail will be a  
perfect square.  
I use attachment\_fu and ImageScience to handle photo uploads. Can  
anyone help me or give me a hint on how to create my cropped  
thumbnails ?

class Photo \< ActiveRecord::Base

belongs\_to :user

has\_attachment :content\_type =\> :image,  
:storage =\> :file\_system,  
:size =\> 1.byte…12.megabytes,  
:thumbnails =\> { :thumb =\> ‘125x83\>’ , :MS =\>  
‘500x333\>’ },  
:path\_prefix =\> “/public/photos/”

validates\_as\_attachment

end

Thanks,  
Demetris.
