Permanent Tourist: Remote Gallery Block
A WordPress plugin to get and render an image gallery based on a remote custom API.
by Say Hello GmbH · github.com/markhowellsmead/pt-remotegallery
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/markhowellsmead/pt-remotegallery/archive/refs/heads/main.zipReadme
Permanent Tourist Remote Gallery
A lightweight WordPress plugin that registers a Gutenberg block (Remote Gallery) to render a remote image gallery fetched from a JSON API.
Requirements
- WordPress 7.0+
- PHP 8.3+
What it does
- Registers a block (apiVersion 3) and server-side renders a container with
data-endpointanddata-images-per-pageattributes. - Frontend JavaScript fetches paged image data from the configured endpoint and renders a responsive grid (grid500-style).
- Images are lazy-loaded and will fade in when loaded. Captions are rendered in the DOM but hover-to-show CSS has been disabled by default.
- The block currently does not link images and has no lightbox.
How to use
- Install the plugin into
wp-content/plugins/pt-remotegalleryand activate it. - Insert the "Remote Gallery" block in the editor.
- Configure the
endpoint(default: https://gallery.permanenttourist.ch/api) andimagesPerPagein the block inspector. - Publish/preview the page — the block will fetch and render images on the frontend.
Notes for developers
- Server render is in
render.php; block metadata is inblock.json. - Frontend JS/CSS are in
build/frontend.jsandbuild/style.css. - The CSS variable
--grid-target-heightdefaults to320pxand is increased to500pxon tall viewports (>1024px). - Filters and the lightbox are disabled; hover-show caption CSS has been disabled but caption markup remains.
If you want changes (re-enable hover captions, restore lightbox, alter layout heuristics), open an issue or request edits in the codebase.
Author
Say Hello GmbH, sayhello.ch.
License
GPL v2+