Patch #2238

HTML::Image does not support index.php in link

Added by Tom Hodges-Hoyland over 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:10/15/2009
Priority:NormalDue date:
Assignee:Woody Gilk% Done:


Target version:v3.0.2
Resolution:fixed Points:


HTML::style and HTML::script support including index.php in the generated link to support a media controller.

HTML::image should follow suit.

Hence the method should be patched to the following:

public static function image($file, array $attributes = NULL, $index = FALSE)
    if (strpos($file, '://') === FALSE)
        // Add the base URL
        $file = URL::base($index).$file;

    // Add the image link
    $attributes['src'] = $file;

    return '<img'.HTML::attributes($attributes).' />';

Associated revisions

Revision 7f87b0dd
Added by Woody Gilk about 5 years ago

HTML::image() should have an $index parameter, similar to HTML::script() and HTML::style(), fixes #2238


#1 Updated by Woody Gilk over 5 years ago

  • Target version changed from v3.0.1 to v3.0.2

#2 Updated by Woody Gilk about 5 years ago

  • Status changed from New to Closed
  • Assignee set to Woody Gilk
  • Resolution set to fixed

Also available in: Atom PDF