tags:

views:

101

answers:

2

My code is as follows:

$image_array = array(
    "src"   =>  base_url() . "img/ajax-bar_loader.gif"
    );
echo img( $image_array );

But when I debug in FireFox, the tag is:

<img original="http://www.mysite.com/img/ajax-bar_loader.gif" style="">

I'm not really sure where that "original" tag came from, but it doesn't render my images. Any ideas?

A: 

Since you are only passing the src attribute, have you tried:

echo img(base_url() . "img/ajax-bar_loader.gif");
Justin Ethier
A: 

I guess you don't need the base_url() part. This should suffice.

$image_array = array(
    "src"   =>  "img/ajax-bar_loader.gif"
    );
echo img( $image_array );

For more, go here: http://codeigniter.com/user_guide/helpers/html_helper.html#img

Vasu