# Adding images using textile

**URL:** <https://www.ruby-forum.com/t/adding-images-using-textile/118233>\
**Category:** Radiant CMS\
**Created:** [October 25, 2007, 12:44am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233 "2007-10-25T00:44:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 12:44am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/1 "2007-10-25T00:44:35Z")

</div>

I am trying to add images to a web page using textile but the image is  
not showing up. I put the image in my public folder/images

then I used the following link:

!http://(mywebsite)/photo.jpg!

Nothing happened - where did I go wrong??

Should I add the complete url??

HELP!!!

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 12:48am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/2 "2007-10-25T00:48:17Z")

</div>

It should be:

!http://(mywebsite)/images/photo.jpg!

If its in your public/images folder.

==  
Will G.

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 1:06am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/3 "2007-10-25T01:06:47Z")

</div>

Will G. wrote:

> It should be:
> 
> !http://(mywebsite)/images/photo.jpg!
> 
> If its in your public/images folder.
> 
> ==  
> Will G.

Will Thanks for responding

yes it is in my public images folder

should I list ther entire string - ie

!http://(mywebsite)/work/public/images/photo.jpg!

or should it simply be:

!http://(mywebsite)/images/photo.jpg!

Thanks I am new at this!

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 1:18am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/4 "2007-10-25T01:18:05Z")

</div>

Give either one a shot and find out, but it should be the full path  
to the image starting with the public directory.

So you can assume that (mywebsite) is the same as public

(mywebsite)/path/to/image  
is the same as:  
public/path/to/image

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 1:51am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/5 "2007-10-25T01:51:25Z")

</div>

Jim G. wrote:

> Give either one a shot and find out, but it should be the full path  
> to the image starting with the public directory.
> 
> So you can assume that (mywebsite) is the same as public
> 
> (mywebsite)/path/to/image  
> is the same as:  
> public/path/to/image

thanks it worked - part of the problem was the photo file size after I  
took it into photoshop and reduced the size it appeared.

Thanks for all your help.

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 5:56am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/6 "2007-10-25T05:56:47Z")

</div>

Maggie Patrick wrote:

> > 
> 
> thanks it worked - part of the problem was the photo file size after I  
> took it into photoshop and reduced the size it appeared.
> 
> Thanks for all your help.

I think you’ve already found your answer but I just want to add that you  
can use relative paths (paths relative to public/ in the case of  
Radiant).

For example, I often use something like this for my images:

!\>/images/pages/te\_usb.jpg!

The div is what styles it, the ‘\>’ floats the div to the right and the  
URL is, of course, right there! I upload my pictures to  
[Radiant\_Site]/public/images/pages

The result for this is at:  
[http://tec.onghu.com/articles/booting-the-t-engine-from-usb/](http://tec.onghu.com/articles/booting-the-t-engine-from-usb/)

Cheers,  
Mohit.  
10/25/2007 | 11:54 AM.

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 1:12am UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/7 "2007-10-25T01:12:49Z")

</div>

The latter.

The public directory in a Rails app (which Radiant is) roughly maps to  
http://(mywebsite)/ (of  
course except for Rails routes, which are not actually part of the file  
system, per se).

Will G.

---

<div class="post-metadata">

**Author:** ![maggiep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@maggiep](https://www.ruby-forum.com/u/maggiep)\
**Post date:** [October 25, 2007, 1:44pm UTC](https://www.ruby-forum.com/t/adding-images-using-textile/118233/8 "2007-10-25T13:44:42Z")

</div>

Check out the Textile reference here: [Textile Reference](http://hobix.com/textile/) and  
the sandbox here: [http://textile.thresholdstate.com/](http://textile.thresholdstate.com/)

You can use any valid path between two exclamation points. So,  
!../images/foo.jpg!  
!/images/foo.jpg!  
! [http://www.example.com/images/foo.jpg](http://www.example.com/images/foo.jpg)!

will all work, as long as the path is correct.
