Description
A spinnaker is a special type of sail that is flown in front of the main sails. It’s packed away when not in use, but when the wind is right, it can be unfurled to provide a powerful boost. This plugin is named Spinnaker because it allows you to keep your images and PDFs neatly tucked away, ready to be “unfurled” into a beautiful, accessible lightbox when your users need them.
Spinnaker is a lightweight, modern, and highly accessible plugin that turns any image or PDF link into a fully-featured dialog lightbox. It’s built with accessibility as a priority, ensuring a seamless experience for users with keyboards and screen readers.
Image Lightbox Features:
- Converts any
<img>tag into a clickable lightbox trigger. - Displays a large, scrollable version of your image that fills the viewport without forcing double-scrollbars.
- Adds scroll-arrow buttons for easy navigation of oversized images.
- Supports custom initial image positioning (e.g., center, top, bottom, left, right).
- Displays image credits as a “placard,” with support for links.
- Provides a “Download” button for the full-size image.
- Fully localizable UI text in Spanish, Russian, Vietnamese, Simplified Chinese, Arabic, Korean, and Somali.
PDF Lightbox Features:
- Converts any
<a>tag pointing to a PDF into a lightbox trigger. - Displays the PDF in an embedded viewer right on your site.
- Includes a “Download” button.
- Supports page builder modules (like DIVI) where you can only add a class to the container.
- Tracks PDF views and downloads, with stats available in the WordPress admin.
- Fully localizable UI text in Spanish, Russian, Vietnamese, Simplified Chinese, Arabic, Korean, and Somali.
Usage
Image Lightbox
To make an image open in a lightbox, add the class image-lightbox-trigger to the <img> tag itself.
For Gutenberg Block Editor:
Gutenberg wraps images in a <figure> element. Add the class image-lightbox-trigger-container to the figure wrapper: Select the image block, open the “Advanced” panel in the block settings, and add image-lightbox-trigger-container to the “Additional CSS class(es)” field. For screen reader descriptions, you can use the image’s “Title” field (available in the image block settings). For advanced features like credits and positioning, switch to HTML editing mode.
For Page Builders (like DIVI):
If you can only add a class to the container/module holding the image, add the class image-lightbox-trigger-container to the container. The plugin will find the first image inside it and turn it into a lightbox.
Optional Attributes (add to the <img> tag):
data-description="…": A longer description for screen readers. Note: Users of Gutenberg and other page builders that don’t allow custom attributes to be added can use the image’s “Title” field. The plugin will automatically use the title text for the screen reader description and remove the title attribute from the image to prevent duplicate announcements.data-credit="…": The text for the credit placard. Requires HTML editing mode in Gutenberg.data-credit-link="…": A URL to make the entire credit placard a link. Requires HTML editing mode in Gutenberg.data-position="…": Set the initial scroll position. Options:top,bottom,left,right, orcenter(default). Requires HTML editing mode in Gutenberg.
Localization:
To translate the UI text, add a language-specific class like -es (for Spanish) to the trigger class (e.g., image-lightbox-trigger-es).
- Supported languages: Spanish (
-es), Russian (-ru), Vietnamese (-vi), Simplified Chinese (-zh), Arabic (-ar), Korean (-ko), and Somali (-so).
Example HTML:
<img class="image-lightbox-trigger-es" src="…" alt="…"
data-description="Una descripción detallada de la imagen."
data-credit="Foto por Jane Doe"
data-credit-link="[https://example.com](https://example.com)"
data-position="right">
PDF Lightbox
To make a link to a PDF open in a lightbox, add the class pdf-lightbox-trigger to the <a> tag itself.
For Page Builders (like DIVI):
If you can only add a class to the container/module holding the link, add the class pdf-lightbox-trigger-container to the container. The plugin will find the correct PDF link inside it.
Localization:
To translate the UI text, add a language-specific class like -es (for Spanish) to the trigger class (e.g., pdf-lightbox-trigger-es).
- Supported languages: Spanish (
-es), Russian (-ru), Vietnamese (-vi), Simplified Chinese (-zh), Arabic (-ar), Korean (-ko), and Somali (-so).
Example HTML:
<a href="/path/to/file.pdf" class="pdf-lightbox-trigger-es">Directorio</a>
Screenshots

Page utilizing Spinnaker’s dual functionality: Image and PDF lightboxes. 
An example of the Image Lightbox unfurled, showcasing the download and close buttons. 
An example of the PDF Lightbox displaying a document within the embedded viewer, showing easy dismiss options: close button, or clicking off the lightbox. 
How to add a PDF trigger class using the Gutenberg editor’s “Advanced” panel. 
The Settings page where you can view view/download statistics and configure plugin options.
Installation
- Upload the
spinnaker-dialog-lightboxes.zipin your WordPress plugins dashboard. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Navigate to Settings > Spinnaker Lightbox to configure options and view stats.
FAQ
-
Does this plugin require shortcodes?
-
No. Spinnaker works by adding CSS classes and optional data attributes directly to your images and links, making it fast and easy to use.
-
Can I customize the appearance?
-
Yes. You can modify the background and text color of the download and close buttons (white text on black background by default) by setting your colors in your site’s styles with selectors of ‘dialog>.spinnaker-close-button’ and ‘dialog>.spinnaker-download-button’. If your light brand color has good contrast against black, like light blue (#91ccef) for example, you could set these styles in the customizer:
dialog>.spinnaker-close-button, dialog>.spinnaker-download-button{
color: #91ccef
}
dialog>.spinnaker-close-button:hover, dialog>.spinnaker-download-button:hover{
background: #91ccef;
} -
Is it accessible?
-
Yes. Accessibility is a core feature. Spinnaker uses a native HTML
<dialog>element, manages focus correctly, and provides screen reader-only text to ensure a great experience for all users.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Spinnaker Dialog Lightboxes” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Spinnaker Dialog Lightboxes” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0
- Initial public release.
- Combines image and PDF lightbox functionality into a single plugin.
- Adds scroll arrows and initial positioning for oversized images.
- Adds support for page builder containers.
- Adds localization for UI text.