# Image thumbnails

**URL:** <https://www.ruby-forum.com/t/image-thumbnails/175580>\
**Category:** Rails\
**Created:** [September 15, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/image-thumbnails/175580 "2009-09-15T23:56:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![camokatu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@camokatu](https://www.ruby-forum.com/u/camokatu)\
**Post date:** [September 15, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/image-thumbnails/175580/1 "2009-09-15T23:56:00Z")

</div>

Hi,

I am trying to create image thumbnails and found this script:  
[http://www.cleverleap.com/ruby-thumbnail-generator/](http://www.cleverleap.com/ruby-thumbnail-generator/). Looks like image  
is being scaled down and copied to cache folder, however nothing is  
being displayed. I particularly don’t understand this piece of code:

cgi = CGI.new  
cgi.out(“type”=\>“image/jpeg”) { @pic }  
render :nothing =\> true

I guess it supposed to render @pic which holds the image file, but  
what does render:nothing =\> true mean?

thanks!  
camokatu

---

<div class="post-metadata">

**Author:** ![camokatu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@camokatu](https://www.ruby-forum.com/u/camokatu)\
**Post date:** [September 15, 2009, 11:59pm UTC](https://www.ruby-forum.com/t/image-thumbnails/175580/2 "2009-09-15T23:59:31Z")

</div>

On Tue, Sep 15, 2009 at 1:30 PM, camokatu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> what does render:nothing =\> true mean?  
> It means don’t include the application layout, just send the image.

> **[ActionController::Base](https://api.rubyonrails.org/classes/ActionController/Base.html#M000658)**
>
> Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either it renders a template or redirects to another action.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
