Support » Plugin: Lightbox with PhotoSwipe » How to implement?

  • Installed & activated, but couldn’t find any documentation. How do I apply the lightbox to, say, the featured image or a WordPress gallery? Do I need to inject a rel attribute or something?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mostly, it just works.

    Featured images: I don’t know.


    1. Click the “Add Media” button in the post/page editor.
    2. Select “Create Gallery” and select the images you want in the gallery.
    3. Click the button “Create new Gallery”.
    4. In the “Gallery Settings” in the next panel, select “Media File” in the “Link to” dropdown.
    5. Click the “Insert Gallery” dropdown

    Alternatively, if you already have a gallery inserted in the page, make sure that it has the link="file" option included.

    That is, change a gallery that looks something like: [gallery ids="1234,5678,9012,3456"] to one that looks something like: [gallery link="file" ids="1234,5678,9012,3456"]

    Plugin Author Arno Welzel


    As ElectricFeet already mentioned – all linked images automatically open with PhotoSwipe.

    But be aware that gallery images need to be set to “link to media”, which you can either change in the gallery options or by adding link="file to the gallery code.

    This is neccessary since the plugin only scans the HTML code of the generated page for linked images and does not change the way, how the gallery output is generated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to implement?’ is closed to new replies.