# Paperclip

**URL:** <https://www.ruby-forum.com/t/paperclip/183491>\
**Category:** Rails\
**Created:** [February 15, 2010, 4:21pm UTC](https://www.ruby-forum.com/t/paperclip/183491 "2010-02-15T16:21:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paradise](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8e7dd6/32.png) [@paradise](https://www.ruby-forum.com/u/paradise)\
**Post date:** [February 15, 2010, 4:21pm UTC](https://www.ruby-forum.com/t/paperclip/183491/1 "2010-02-15T16:21:38Z")

</div>

Hi,

Wondering is there a way in paperclip to rename images as the are being  
saved to  
image\_id+count ?

my code in image.rb model

has\_attached\_file :data, :styles =\> { :large =\> “371_251\>", :small =\>  
"72_72\>”},  
:url =\> “/assets/:id”,  
:path =\>  
“:rails\_root/assets/docs/:id/:style/:basename.:extension”

belongs\_to :attachable, :polymorphic =\> true

I am attaching file using javascript.

What i am trying to do is when i want to call back images into array I  
want frist image to be large and second and third to be small. So if i  
could change name of images to be image\_id plus count in array as name i  
would know that id\_1 is large and so on.
