=== Lightbox Gallery ===
Contributors: snehalpancholi
Tags: lightbox, gallery, images, media, accessible
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Opens WordPress gallery and content images in an accessible, self-hosted lightbox with keyboard navigation, swipe support, and captions.

== Description ==

Lightbox Gallery adds a beautiful, accessible lightbox to your WordPress site with zero external dependencies. It supports classic galleries, Gutenberg block galleries, and standalone content images linked to their full-size file.

**Features:**

* Works with classic galleries and Gutenberg block galleries
* Supports standalone content images linked to the full-size file
* Keyboard navigation (arrow keys + Escape)
* Touch/swipe support for mobile devices
* Image counter (e.g. "3 / 12")
* Caption display from alt text or title
* Three animation styles: Fade, Slide, or None
* Optional skip-first-image setting to preserve LCP performance
* Close on backdrop click
* Fully accessible (ARIA roles, focus management)
* No jQuery, no external CDN, no page weight bloat
* Automatic updates from AddonLogic update server

== Installation ==

1. Upload the `lightbox-gallery` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu
3. Configure options at **Settings → Lightbox Gallery**

== Frequently Asked Questions ==

= Does this work with the Gutenberg block editor? =
Yes. It detects both classic galleries (`.gallery .gallery-item a`) and block galleries (`.wp-block-gallery .wp-block-image a`).

= Will it slow down my site? =
No. The CSS and JS are only loaded on singular posts, archives, and the home page. The lightbox DOM is built on first click, not on page load.

= How do I enable lightbox for images that aren't in a gallery? =
Enable "Standalone content images linked to full-size file" in the settings. Any `<a>` tag wrapping an `<img>` and pointing to a direct image URL will get the lightbox treatment.

= How are captions determined? =
The plugin reads the image's `alt` attribute, then its `title` attribute, then the link's `data-caption` attribute, in that order.

= What does "Skip first content image" do? =
It excludes the very first linked image in the post content from the lightbox so the browser can prioritise it as the Largest Contentful Paint (LCP) element without the lightbox script intercepting it.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Lightbox open on a gallery image with prev/next navigation and caption.
2. Settings page under Settings → Lightbox Gallery.
