# Pictures out from images folder

**URL:** <https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659>\
**Category:** Rails\
**Created:** [January 15, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659 "2010-01-15T14:49:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erwillie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Post date:** [January 15, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659/1 "2010-01-15T14:49:55Z")

</div>

Hi!!!  
I wanna to show in my web page a picture, but this picture I canÂ´t move  
it from the folder where it is. I know that in Rails you have to have  
the picture in the images folder, but I wanna to know if it is possible  
to show a picture from another folder different.

Thanks!!

---

<div class="post-metadata">

**Author:** ![erwillie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Post date:** [January 15, 2010, 2:58pm UTC](https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659/2 "2010-01-15T14:58:05Z")

</div>

On Jan 15, 1:49Â pm, Guille S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi!!!  
> I wanna to show in my web page a picture, but this picture I canÂ´t move  
> it from the folder where it is. I know that in Rails you have to have  
> the picture in the images folder, but I wanna to know if it is possible  
> to show a picture from another folder different.

public/images is the usual place to put images but anywhere within the  
public folder will do (since that is what your document root is). With  
extra configuration you can probably get your webserver to serve  
images from other locations too.

Fred

---

<div class="post-metadata">

**Author:** ![erwillie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Post date:** [January 15, 2010, 3:05pm UTC](https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659/3 "2010-01-15T15:05:59Z")

</div>

Frederick C. wrote:

> On Jan 15, 1:49Â pm, Guille S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi!!!  
> > I wanna to show in my web page a picture, but this picture I canÂ´t move  
> > it from the folder where it is. I know that in Rails you have to have  
> > the picture in the images folder, but I wanna to know if it is possible  
> > to show a picture from another folder different.
> 
> public/images is the usual place to put images but anywhere within the  
> public folder will do (since that is what your document root is). With  
> extra configuration you can probably get your webserver to serve  
> images from other locations too.
> 
> Fred

Ok, but IÂ´m newie in RoR, how can I do that??

Thanks

---

<div class="post-metadata">

**Author:** ![erwillie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Post date:** [January 16, 2010, 12:18am UTC](https://www.ruby-forum.com/t/pictures-out-from-images-folder/181659/4 "2010-01-16T00:18:21Z")

</div>

Sure it is possible and you have many options how to reach it. The  
easiest way is probably to make a filesystem link from Rails image  
folder to your unmovable folder. Like (provided you are in your rails  
public/images directory)

ln -s /your/unmovable

and you can reach your images like this

image\_tag ‘unmovable/something.png’

cheers

Jakub
