AddImageType

Summary: Add new image type extension
Version: pmwiki-2.4.3
Prerequisites: PmWiki version: 2.0+
Status: Stable
Maintainer: Petko
Discussion: AddImageType-Talk
Discussion: AddImageType-Talk

Questions answered by this recipe

How do I add a new image type extension to the list that PmWiki automagically recognizes to display as images?

Description

To add a new image type extension, say .ico (icon), you can append the extensions to the $ImgExtPattern variable in the config.php file.

$ImgExtPattern = "(?:$ImgExtPattern|\\.ico|\\.ICO)";

An example of adding .bmp (bit map) and removing .svg (that is enabled in the default installation) requires to redefine the variable:

$ImgExtPattern = "\\.(?:gif|jpg|jpeg|png|bmp|GIF|JPG|JPEG|PNG|BMP)";

Notes

Release Notes

See Also

Contributors

  • PM

Comments

See discussion at AddImageType-Talk

User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.