Bild "misc:de.png" Bild "misc:gb.png"

PhotoSwipe for FlatPress

This FlatPress plugin displays single images and whole image galleries with the JavaScript library PhotoSwipe which provides a very appealing fullscreen display of the images. And on mobile devices such as tablets or smartphone you can browse through the images by swipe gestures.
Since the plugin uses FlatPress default functionality for building the image HTML, you may use the documented parameters of the [img] tag such as "alt", "title", "height", "width" or "float" (see FlatPress BBCode documentation for details).

Download: PhotoSwipe for FlatPress (102.6 KB)


For a single image:
Floating image with given width:
[photoswipeimage="images/image.jpg" width="200" float="right"]

For an image gallery:
Gallery width given image height:
[photoswipegallery="images/NameOfTheGallery" height="100"]


The HTML code of the images is generated by the BBCode standard function do_bbcode_img() (see fp-plugins/bbcode/plugin.bbcode.php). Therefore, standard image attributes (such as "width", "height", etc.) can be used. Floating images will get a corresponding CSS class (e.g. "floatright").
The plugin will wrap that HTML in a <figure> element with the same CSS class as the image (e.g. "floatright"). The <figure> also contains a <figcaption> displaying the title of the image.
The <figure> element itself is surrounded by a <div class="photoswipe">.

Galleries are displayed as a series of images as described above, encapsulated by a <div class="img-gallery">.


Captions of the gallery images will be read from a text file "texte.conf" within the gallery directory.
For having the title attribute in the gallery images (and therfore, also see it as description below the images in the gallery), just create a file "texte.conf" within the gallery directory. If you have the gallery images 1.jpg, 2.jpg and someother.jpg, your texte.conf should look like this:
1.jpg = Description of the first image
2.jpg = This is the second image.
someother.jpg = OMG, another image!
For now, you have to create the texte.conf files for each gallery manually via FTP, I haven't developed a convenient plugin UI for that. You may if you want to :)


2021-06-03: Version 1.0.4

  • Bugfix: texte.conf doesn't have to be ISO-8859-1 encoded any more.

2021-01-16: Version 1.0.3

  • Bugfix: PhotoSwipe plugin will load own jQuery library only if jQuery plugin is not enabled.

2020-12-09: Version 1.0.2

  • Bugfix: initializePluginTags() has to be public static.

2017-09-16: Version 1.0.1

  • Bugfix: getPhotoSwipeOverlay() and echoScriptTags() have to be static.

2017-08-11: Version 1.0

  • Initial plugin version.

Bild "Start:arvid.jpg"
Arvid Zimmermann, from Germany, doing computer stuff. Details ...

More stuff:
Bike touring book
GitHub profile
SourceForge profile



Issue 09/2019 of linuxUSER discusses FlatPress extensively.
Bild "linuxuser-logo.jpg"

Mix2Stix was shipped and reviewed with c't 14/2011.
Bild "Mix2Stix:ct-logo.jpg"

PC Praxis put Mix2Stix in no. 06/2008 into the "Top of the tools". Quote: "Good software can be so simple!"
Bild "Mix2Stix:pcpraxis-logo.gif"