Is it possible to show an image in a wiki page with a relative path? Instead of:

I would like to use something like:



Try using InterMap? links as described on the CustomInterMap? page.

Place the following line in local/localmap.txt (create localmap.txt if needed):

    Images    /pmwiki/pub/skins/pmwiki/  

    OR, if this does not work, try: (maybe the above is a typo?)

    Images:   /pmwiki/pub/skins/pmwiki/   

You can use the following markup to get to the image


The resulting HTML output will be

    <img src="/pmwiki/pub/skins/pmwiki/pmwiki-32.gif" />


Is there a way to configure the system to generate relative URL (without servernamein it) for all internal links (eg. to other Wiki-Pages)?


Maintain the parameter $ScriptUrl in config.php according to your needs

Notes and Comments

These instructions came from an email written by Pm. The relative URLs question gets asked so often, I thought it deserved a Cookbook page.

Also note that the "Attach:image.gif" markup could be considered a form of relative addressing that displays images from the uploads directory of the current page. See UploadsAdmin? for more details.

  • This recipe was last tested on PmWiki version: n/a
  • This recipe requires at least PmWiki version: should work with any version

See Also


Category: Images