It's better when it's simple

User Tools

Site Tools


prettyphoto Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Adds prettyPhoto support for images

Last updated on
By lpaulsen93 (previous author: Marcus von Appen)

The plugin will automatically create prettyPhoto popup links for all images that are embedded as direct links.

You can find a simple showcase at FIXME


Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.


The default configuration of the plugin will provide a overlay box for images that are linked directly into the page:


The plugin is comes with an own renderer that automatically replaces internal image media links, which refer to the details page of the images, with direct links to the images. This is a convenience mechanism to save you typing “?direct” for each and every image link. See images for further details about image links.

Using '?direct' as image parameter will cause the plugin to create lightbox-like overlays.


'?nolink' will not cause the plugin to create any overlay. The default behaviour is preserved.


'?linkonly' will not cause the plugin to create any overlay. The default behaviour is preserved.


If you do not want to rework all your image links, you can also enable the custom renderer that ships with the plugin. It will pick all images that do not use the 'nolink' or 'linkonly' parameter and create an overlay.



The main magic happens within script.js, which will pull in a configuration file prettyphoto.conf.js, located in DokuWiki's conf/ folder. Two javascript variables will be tested within the configuration file,


which defines the media item link for the DokuWiki installation. By default, DokuWiki uses lib/exe/fetch.php?media=, your installation however might use different links, changed by rewrite rules. If this is the case, you should set

var PRETTYPHOTO_PLUGIN_MEDIAPATH = "<your media path>";

within prettyphoto.conf.js. To customize the behaviour of the prettyPhoto overlay, you can use


which contains the prettyPhoto configuration to be used (see the prettyPhoto documentation for further details on customizing), e.g.

var PRETTYPHOTO_PLUGIN_PARAMS = { social_tools: '' };

for disabling social media integration.


Starting from 4th of October 2020 the plugin is maintained by lpaulsen93. It is based on a fork from s.sahara who fixed the Hogfather incompatibility.

Change Log

Known Bugs and Issues

Please post any bugs or issues on the bug tracker

Feature requests

Please post feature requests on the bug tracker

:!: Doesn't work with Dokuwiki rewrite mode. FIXME

What execatly does not work? If you're using .htaccess rewriting, just tweak the paths in the .conf.js file.
Having trouble to get the renderer to work with hrun - had a running installation, copied all content, installed prettyphoto afterwards through plugin manager. using htaccess rewrite and no gallery pluginin. the photo gets no lightbox but is opened alone in the tab –~~
I can confirm that Dokuwiki rewrite crashes this plugin. A working fix ist ready to be pulled, but it seems the author is not updating any more. So you have to merge/update manually with the files from this pull-request-link.
The prettyPhoto v.3.1.6 had released on May 7, 2015 which covers a XSS Fix. There is a fork of “PrettyPhoto Plugin for DokuWiki” that includes updated prettyPhoto v3.1.6 and a patch I sent as PR around 2014 (Auto detection of PRETTYPHOTO_PLUGIN_MEDIAPATH based on $conf['userewrite'] setting). it works with DokuWiki Release 2015-08-10a “Detritus”. — s.sahara 2015-10-15 14:27

Has this been updated to work with DokuWiki Igor?

plugin/prettyphoto.txt · Last modified: 2022-09-15 18:43 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki