Mime Type Image Macro

The "Mime Type Image" macro displays an icon for a variety of common mime types and file name extensions. The supported file formats include image formats and Office documents formats.

Usage

#mimetypeimg($mimetype $filename)

Parameters

NameOptionalAllowed valuesDescriptionDefault value
mimetypeNoA stringThe mime type of an attachmentNone
filenameNoA stringThe filename of an attachmentNone
Since the macro does not handle the conversion, both parameters need to be in lowercase.

Example

For an attached file, you could use the syntax below:

{{velocity}}
{{html}}
#mimetypeimg("image/jpeg" "Desert.jpeg")
{{/html}}
{{/velocity}}
 

which will display

MimeTypeImageMacro.png

Related Pages

Search this space