Add icons to your links and creates small images for them according to there link extensions.

Picture of the recipe

Questions answered by this recipe

How can I easily display the type of links like PDF, HTML with a little icon according to the type and can use the icons for external links while internal links of my wiki are displayed in normal style?


This recipe simply add icons to your links. Just follow the instruction of the installation.


  • download from source or via git git clone
  • make the following copy-tasks:
  • put linkicons.php to your cookbook directory (cp pmwiki-linkicons-recipe/cookbook/linkicons.php cookbook/)
  • put linkicons directory in your public directory (normally pub) (cp -R pmwiki-linkicons-recipe/pub/linkicons/ pub/)
  • put linkicons.css in your CSS directory (normally pub/css) (cp pmwiki-linkicons-recipe/pub/css/linkicons.css pub/css/)
  • add to local/config.php:
  • $UrlLinkFmt= "<a class='external' href='\$LinkUrl' rel='nofollow'\>\$LinkText</a>";
  • include_once("$FarmD/cookbook/linkicons.php");


Credits goes to Jeremie Tisseau. The icons are from FamFamFam. This recipe doesn't work under Internet-Explorer - feel free to post the CSS-hacks to get it working. To enable the upload of SVG's you need to add $UploadExts['svg'] = 'image/svg'; in your config.php.

See Also

  • External Links Configure external links to open in a new window, have a "tool tip title", or use other CSS classes.
  • External Links2 Add and icon to external links and make them automatically open in a new window.
  • Attach Icons Add icon images to Attach file links according to file extension.
  • Attach Icons2 Add icon images to Attach file links according to file extension.
  • Custom Bullets Enable custom bullets to distinguish document types.


See Linkicons-Talk - your comments are welcome there!


Feature request, bugs, questions, and so on can be send to If you enjoy the script please leave your comment under Linkicons Users.


This software is licensed under the MIT license.

© 2011-2017 Matthias Günther

/ vim: set ts=2 sw=2 textwidth=120: /