# Rhtml image trouble

**URL:** <https://www.ruby-forum.com/t/rhtml-image-trouble/103953>\
**Category:** Rails\
**Created:** [May 11, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/rhtml-image-trouble/103953 "2007-05-11T22:42:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@raj](https://www.ruby-forum.com/u/raj)\
**Post date:** [May 11, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/rhtml-image-trouble/103953/1 "2007-05-11T22:42:28Z")

</div>

![]()

I have this line in rhtml layout file of my controller file and the  
image is in public/images/

the image is not displayed.

please help.

---

<div class="post-metadata">

**Author:** ![raj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@raj](https://www.ruby-forum.com/u/raj)\
**Post date:** [May 11, 2007, 10:56pm UTC](https://www.ruby-forum.com/t/rhtml-image-trouble/103953/2 "2007-05-11T22:56:29Z")

</div>

On May 11, 2007, at 4:42 PM, raj wrote:

> ![]()
> 
> I have this line in rhtml layout file of my controller file and the  
> image is in public/images/
> 
> the image is not displayed.
> 
> please help.

Try:

![](https://www.ruby-forum.com/images/mainimage.jpg)

Or in Rails:

\<%= image\_tag ‘mainimage.jpg’, :size =\> ‘250x250’ %\>

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![raj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@raj](https://www.ruby-forum.com/u/raj)\
**Post date:** [May 12, 2007, 1:21am UTC](https://www.ruby-forum.com/t/rhtml-image-trouble/103953/3 "2007-05-12T01:21:21Z")

</div>

Thank you that worked.
