{html_image}{html_image} is a
custom function
that generates a HTML <img> tag.
The height and width
are automatically calculated from the image file if they are not supplied.
Attribute NameTypeRequiredDefaultDescriptionfilestringYesn/aname/path to imageheightstringNoactual image heightHeight to display imagewidthstringNoactual image widthWidth to display imagebasedirstringnoweb server doc rootDirectory to base relative paths fromaltstringnoAlternative description of the imagehrefstringnon/ahref value to link the image topath_prefixstringnon/aPrefix for output pathbasedir is the base directory that relative image
paths are based from. If not given, the web server's document root
$_ENV['DOCUMENT_ROOT'] is used as the base.
If $security
is enabled, the path to the image must be within a
secure directory.
href is the href value to link the image to.
If link is supplied, an <a href="LINKVALUE"><a> tag is placed
around the image tag.
path_prefix is an optional prefix string you can give
the output path.
This is useful if you want to supply a different server name for the image.
All parameters that are not in the list above are printed as
name/value-pairs inside the created <img> tag.
Technical Note{html_image} requires a hit to the disk to read the
image and calculate the height and width. If you don't use template
caching,
it is generally better to avoid {html_image} and leave
image tags static for optimal performance.
{html_image} example
Example output of the above template would be:
]]>