PHPackages                             jonnitto/photoswipe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. jonnitto/photoswipe

ActiveNeos-plugin[Image &amp; Media](/categories/media)

jonnitto/photoswipe
===================

PhotoSwipe for Neos CMS

5.0.1(1mo ago)627.9k↓50%71GPL-3.0-or-laterJavaScriptCI failing

Since Apr 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jonnitto/Jonnitto.PhotoSwipe)[ Packagist](https://packagist.org/packages/jonnitto/photoswipe)[ Docs](https://github.com/jonnitto/Jonnitto.PhotoSwipe)[ Fund](https://www.paypal.me/Jonnitto/20eur)[ GitHub Sponsors](https://github.com/jonnitto)[ RSS](/packages/jonnitto-photoswipe/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (66)Used By (1)

[![Latest stable version](https://camo.githubusercontent.com/3c207495cddfc4c8d50194a58b8995e221a2900f116961ec132a65bc5ce9e4ff/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6e6e6974746f2f70686f746f73776970652f762f737461626c65)](https://packagist.org/packages/jonnitto/photoswipe) [![Total downloads](https://camo.githubusercontent.com/ec2ecf3dc1f29a9dd02a46d5d7c571584efca7b25ff0edf82a0e30cf298e0001/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6e6e6974746f2f70686f746f73776970652f646f776e6c6f616473)](https://packagist.org/packages/jonnitto/photoswipe) [![License](https://camo.githubusercontent.com/94b36e9121a9f991ba2c52edf587927f1390da94c60931f59cd77ff6443a1952/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6e6e6974746f2f70686f746f73776970652f6c6963656e7365)](https://packagist.org/packages/jonnitto/photoswipe) [![GitHub forks](https://camo.githubusercontent.com/e3646033b067129da5d319069d93ea142694dbe8d747d96c5e8470befc1c4457/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6f6e6e6974746f2f4a6f6e6e6974746f2e50686f746f53776970652e7376673f7374796c653d736f6369616c266c6162656c3d466f726b)](https://github.com/jonnitto/Jonnitto.PhotoSwipe/fork) [![GitHub stars](https://camo.githubusercontent.com/ce987551b4e348559a6ac3700526303e4025baf65dbef3c2caf64b2c021769c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6f6e6e6974746f2f4a6f6e6e6974746f2e50686f746f53776970652e7376673f7374796c653d736f6369616c266c6162656c3d5374617273)](https://github.com/jonnitto/Jonnitto.PhotoSwipe/stargazers) [![GitHub watchers](https://camo.githubusercontent.com/7c7a19d118976b194f1efdca15a15af77fd238267680208439535f5a300cd120/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6a6f6e6e6974746f2f4a6f6e6e6974746f2e50686f746f53776970652e7376673f7374796c653d736f6369616c266c6162656c3d5761746368)](https://github.com/jonnitto/Jonnitto.PhotoSwipe/subscription) [![GitHub followers](https://camo.githubusercontent.com/d6a5c27d7c6c05ecc3a033972dd1c1d6e88610dc4495d29b74681b0dfe391eb5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f6c6c6f776572732f6a6f6e6e6974746f2e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://github.com/jonnitto/followers) [![Follow Jon on Twitter](https://camo.githubusercontent.com/a5d40acbfdb781560e282476df7895f40f8b10783e6b1b9058900bd601d5d2a8/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6a6f6e6e6974746f2e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://twitter.com/jonnitto)

Jonnitto.PhotoSwipe
===================

[](#jonnittophotoswipe)

**This package includes [PhotoSwipe](http://photoswipe.com/) into [Neos CMS](https://www.neos.io)**

VersionNeosMaintained0.\*2.\*✗&gt; 1.43.\* + 4.\*✗2.\*3.3 + 4.\*✗&gt; 3.\*3.3 + 4.\*✗&gt;= 3.1.23.3 - 8.\*✗4.\*7.3 - 8.\*✗5.\*8.4 - 9.\*✓Required HTML markup
--------------------

[](#required-html-markup)

Each element that matches the selector `a.lightbox` must have such attributes:

- Image URL in `href` or `data-pswp-src` attribute (latter has higher priority).
- Image width in `data-pswp-width`.
- Image height in `data-pswp-height`.

And optionally:

- `` thumbnail within the link element that will be displayed before the large image is loaded
- Optional `data-cropped="true"` attribute if thumbnail is cropped. See also [Animating from Cropped Thumbnail](https://photoswipe.com/opening-or-closing-transition#animating-from-cropped-thumbnail). PhotoSwipe API supports almost any markup and any data source, [read more about it here](https://photoswipe.com/data-sources#custom-html-markup).

Example:

```
...
```

Javascript variables
--------------------

[](#javascript-variables)

There is one global variable who get set during the intialisation:

`neosPhotoSwipe` This object stores the `lightbox` variables from PhotoSwiper. (The variable who get used to call `lightbox.init()`). With this, you can add you own [event listener](https://photoswipe.com/events/) or trigger [methods](https://photoswipe.com/methods/).

Javascript event listener
-------------------------

[](#javascript-event-listener)

If you dispatch the event `neos-photoswipe:init` all type of lightboxes get initialized. Great if you work in AJAX enviroments. You can also activate a specific type of lightbox: `neos-photoswipe.images:init`, `neos-photoswipe.fetch:init` or `neos-photoswipe.template:init`.

Example:

```
window.dispatchEvent(new Event('neos-photoswipe:init'));
```

Alter generated markup
----------------------

[](#alter-generated-markup)

### Adding custom attributes to the PhotoSwipe container

[](#adding-custom-attributes-to-the-photoswipe-container)

You can add custom attributes to the PhotoSwipe container like this:

```
Jonnitto:
  PhotoSwipe:
    additonalPswpContainerAttributes:
      data-turbo-temporary: true
      class: 'my-custom-class'
```

### Adding custom attributes to the link in the error fetch message

[](#adding-custom-attributes-to-the-link-in-the-error-fetch-message)

```
Jonnitto:
  PhotoSwipe:
    fetchAttributeErrorMessages: 'data-pswp-type="fetch" data-turbo="false"'
```

Installation
------------

[](#installation)

Most of the time you have to make small adjustments to a package (e.g. configuration in [`Settings.yaml`](Configuration/Settings.yaml)). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site packages located under `Packages/Sites/`. To install it correctly go to your theme package (e.g.`Packages/Sites/Foo.Bar`) and run following command:

```
composer require jonnitto/photoswipe --no-update
```

The `--no-update` command prevent the automatic update of the dependencies. After the package was added to your theme `composer.json`, go back to the root of the Neos installation and run `composer update`. Et voilà! Your desired package is now installed correctly.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~152 days

Total

63

Last Release

44d ago

Major Versions

0.2.1 → 1.3.12017-12-11

1.4.1 → 2.0.02018-07-12

2.2.0 → 3.0.02019-05-03

v3.x-dev → 4.0.02023-12-24

4.6.0 → 5.0.02025-10-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fec51ac160a110a31a72a54ac29e276a447d8306205a052d35491ac9cf0589b?d=identicon)[jonnitto](/maintainers/jonnitto)

---

Top Contributors

[![jonnitto](https://avatars.githubusercontent.com/u/4510166?v=4)](https://github.com/jonnitto "jonnitto (205 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![tbrodard](https://avatars.githubusercontent.com/u/1318737?v=4)](https://github.com/tbrodard "tbrodard (1 commits)")

---

Tags

hacktoberfestneoscmsphotoswipeimagephotogalleryflowNeoslightbox

### Embed Badge

![Health badge](/badges/jonnitto-photoswipe/health.svg)

```
[![Health](https://phpackages.com/badges/jonnitto-photoswipe/health.svg)](https://phpackages.com/packages/jonnitto-photoswipe)
```

###  Alternatives

[nicolafranchini/venobox

Responsive JavaScript modal window plugin, touch swipe gallery

7106.8k](/packages/nicolafranchini-venobox)[dantsu/php-image-editor

PHP library to easily edit image with GD extension.

34152.1k2](/packages/dantsu-php-image-editor)[moc/imageoptimizer

Flow package that optimizes generated thumbnail images (jpg, png, gif, svg) for web presentation.

31106.8k](/packages/moc-imageoptimizer)[jonnitto/plyr

Plyr.io for Neos.io

1236.2k2](/packages/jonnitto-plyr)[frameright/image-metadata-parser

Image metadata parsing library

1133.9k](/packages/frameright-image-metadata-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
