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.


#mimetypeimg($mimetype $filename)


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.


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

#mimetypeimg("image/jpeg" "Desert.jpeg")

which will display


Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space