# Simple image\_tag getting an erroneous parameter added to output

**URL:** <https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334>\
**Category:** Rails\
**Created:** [February 17, 2008, 12:05am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334 "2008-02-17T00:05:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wesley\_Embry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/9fc29f/32.png) [@Wesley\_Embry](https://www.ruby-forum.com/u/Wesley_Embry)\
**Post date:** [February 17, 2008, 12:05am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334/1 "2008-02-17T00:05:34Z")

</div>

I have been everywhere I can think to find an answer  
to this problem.

One of my web pages has a simple image\_tag entry in  
a very straight-forward table.

 ![]()

The value of this field is bordeaux\_noveaux.jpg.

but the result in the html is

```
 <td><img src='<img alt="Bordeaux_noveaux"

```

src="/images/bordeaux\_noveaux.jpg?1203180811" /\>’\>

I have no idea where that option “?1203180811” is coming  
from or even what it means.

I have done extensive searches on the web and read  
the source code for image\_tag. I can’t seem to figure this  
out.

---

<div class="post-metadata">

**Author:** ![Wesley\_Embry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/9fc29f/32.png) [@Wesley\_Embry](https://www.ruby-forum.com/u/Wesley_Embry)\
**Post date:** [February 17, 2008, 1:51am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334/2 "2008-02-17T01:51:43Z")

</div>

I figured it out. I didn’t need to use image\_tag.  
The following worked fine. Didn’t need the image\_url  
either but thought it was a little cleaner.

```
<% image_url = granite_type.thumbnail %>
<td><img src='<%= image_url %>'></td>
```

---

<div class="post-metadata">

**Author:** ![Wesley\_Embry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/9fc29f/32.png) [@Wesley\_Embry](https://www.ruby-forum.com/u/Wesley_Embry)\
**Post date:** [February 17, 2008, 2:15am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334/3 "2008-02-17T02:15:10Z")

</div>

On 16-Feb-08, at 7:50 PM, gnuby wrote:

> > The value of this field is bordeaux\_noveaux.jpg.  
> > the source code for image\_tag. I can’t seem to figure this  
> > out.

did you consider \<%= image\_tag(granite\_type.thumbnail) %\> ?

the params added (1204180811) are the datetime of the file encoded -  
to help with caching.

Jodi

---

<div class="post-metadata">

**Author:** ![Wesley\_Embry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/9fc29f/32.png) [@Wesley\_Embry](https://www.ruby-forum.com/u/Wesley_Embry)\
**Post date:** [February 17, 2008, 5:23am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334/4 "2008-02-17T05:23:57Z")

</div>

Thank you Jodi.

That was even better and now I understand everything that was  
happening.
