https://github.com/th23x/th23-gallery
Replace standard Wordpress Gallery block and legacy [gallery] shortcode handler, opening galleries using PhotoSwipe
https://github.com/th23x/th23-gallery
gallery plugin swipe wordpress
Last synced: about 2 months ago
JSON representation
Replace standard Wordpress Gallery block and legacy [gallery] shortcode handler, opening galleries using PhotoSwipe
- Host: GitHub
- URL: https://github.com/th23x/th23-gallery
- Owner: th23x
- License: gpl-3.0
- Created: 2024-07-18T06:38:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-15T16:06:12.000Z (about 1 year ago)
- Last Synced: 2025-05-15T17:24:22.069Z (about 1 year ago)
- Topics: gallery, plugin, swipe, wordpress
- Language: JavaScript
- Homepage: https://th23.net
- Size: 307 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đˇ th23 Gallery
Replace standard Wordpress Gallery block and legacy [gallery] shortcode handler, opening galleries using PhotoSwipe
## đ Introduction
Wordpress has come a long way to be a fully featured content editor system, but the **default gallery does not keep up** with it. And while there are many plugins with various features, I did not find a small and simple one putting the **focus on enlarged images**.
[**PhotoSwipe**](https://photoswipe.com/) is a great basis and thus core component of my th23 Gallery plugin, which replaces the Wordpress default to output galleries into a way containing all key information required while maintaining a **simple and easy markup**.
> 
> 
`th23 Gallery` is built with some few goals in mind:
* Unintrusive way to **focus on images**
* Leveraging **PhotoSwipe / Lightbox-like** overlay
* Navigation between images in all galleries in a post via **intuitive swipe, keyboard or mouse** activity
* Compatibile with modern **blocks and legacy shortcodes**
* **Simple markup** and styling for thumbnail preview images (polaroid-style)
* **Plain styling** for medium / large preview images allowing for theme based style
* **Minimized footprint** on page loading
## âī¸ Setup
Upload extracted files to your `wp-content/plugins` directory
No options required - **install, activate, enjoy** :-)
Image subtitle in lightbox is image **caption** (defined in gallery), image **description** (as in the media library) or image **title** (as in the media library) - in this order, whatever is given first
Only optional setting is the option to define a **default preview image size** for new galleries via the `Settings` / `Media` page in the admin panel
> [!NOTE]
> There is a [known inconsistency in core WP](https://core.trac.wordpress.org/ticket/40692) not showing this default correctly in new galleries - but it is taken correctly upon saving/including the gallery and upon further edits as well
## đī¸ Usage
`th23 Gallery` works out-of-the-box and does not require any special handling - right after activation all embedded galleries will use PhotoSwipe to enlarge pictures.
> [!NOTE]
> Polaroid-style works only on galleries which have set the preview image size to `Thumbnail`
> [!NOTE]
> Previously inserted galleries might require a review to ensure link to media file and preview image size are set to work as expected - especially when also using the plugin on legacy `[gallery]` shortcodes.
## â FAQ
Q: Can you provide **options** to change x, y or z behaviour in PhotoSwipe?
A: Yes, I could, but this plugin is supposed to be simple - in case you want many individual customization options, have a look at this [open source alternative by Arno Welzel](https://wordpress.org/plugins/lightbox-photoswipe/)
## đ¤ Contributors
Feel free to [raise issues](../../issues) or [contribute code](../../pulls) for improvements via GitHub.
## ÂŠī¸ License
You are free to use this code in your projects as per the `GNU General Public License v3.0`. References to this repository are of course very welcome in return for my work đ