There is an optional second parameter that is a TRUE/FALSE value that
specifics if the src should have the page specified by
$config['index_page'] added to the address it creates.
Presumably, this would be if you were using a media controller:

Additionally, an associative array can be passed to the img() function
for complete control over all attributes and values. If an alt attribute
is not provided, CodeIgniter will generate an empty string.

Example:

$image_properties=array('src'=>'images/picture.jpg','alt'=>'Me, demonstrating how to eat 4 slices of pizza at one time','class'=>'post_images','width'=>'200','height'=>'200','title'=>'That was quite a night','rel'=>'lightbox');img($image_properties);// <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" />