API Docs

lightGallery facts and figures

One page of checkable facts: how big lightGallery is, what it depends on, what it runs in, what it plays, and what it costs. Sizes are measured from the build this site was made with.

lightGallery is an open-source JavaScript lightbox and gallery for images and video, with native React, Vue and Angular packages built on one shared core, no dependencies, and every feature outside the core shipped as an opt-in plugin. This page is the reference for the numbers; the figures that come from the build are measured when the site is built, so they match the version in the heading below.

What is the current version?

Version3.0.0
First 3.0 release9 October 2026
Packageslightgallery, @lightgallery/headless, @lightgallery/react, @lightgallery/vue, @lightgallery/angular
VersioningThe five packages always ship together under one version number
Started2014, as a jQuery plugin; dependency-free since version 2
LanguageTypeScript, with type declarations in every package

How big is lightGallery?

The core is the lightbox itself. Thumbnails, zoom, video and the rest are plugins with their own entry points, so a gallery pays only for the features it imports. A typical image gallery with thumbnails and zoom is the core plus two plugins, about 30 KB of JavaScript gzipped.

Core

FileMinified and gzipped
Core script (lightgallery.min.js)18.6 KB
Core stylesheet (lightgallery.css)2.7 KB

Plugins

Each plugin is a separate entry point; only the ones you import reach the bundle.

PluginMinified and gzipped
Thumbnails4.6 KB
Zoom7.1 KB
Video2.9 KB
Autoplay1.7 KB
Fullscreen1.1 KB
Share3.0 KB
Hash1.3 KB
Rotate2.2 KB
Pager0.9 KB
Comments2.1 KB
Medium zoom0.8 KB
Relative caption0.8 KB
Vimeo thumbnails0.7 KB
Justified layout2.4 KB
Origin crop3.6 KB

Framework packages

The main entry of each package, minified and gzipped, excluding the framework itself. The React, Vue and Angular packages include the headless core they are built on.

PackageMinified and gzipped
@lightgallery/headless14.8 KB
@lightgallery/react13.4 KB
@lightgallery/vue15.1 KB
@lightgallery/angular24.3 KB

What does it depend on?

PackageRuntime dependencies
lightgalleryNone
@lightgallery/headlessNone
@lightgallery/react@lightgallery/headless
@lightgallery/vue@lightgallery/headless
@lightgallery/angular@lightgallery/headless, tslib, and the Angular CDK as a peer

jQuery is not required anywhere. The stylesheets come from the lightgallery package and are shared by every binding.

Which frameworks and versions does it support?

PackageFramework rangeServer rendering
lightgalleryPlain JavaScript or TypeScript, ES module and UMD builds, CDN script tagsMarkup renders on the server; the gallery initialises in the browser
@lightgallery/reactReact 18 and 19Yes: trigger grids render on the server, the lightbox mounts after hydration, no dynamic import needed
@lightgallery/vueVue 3.4 and laterYes, including Nuxt
@lightgallery/angularAngular 21 and 22, standalone components, signal inputs, zonelessYes, including Angular SSR with hydration
@lightgallery/headlessAny framework: the state machine, settings, gesture, zoom and thumbnail maths with no DOMNot applicable

Node 18 or later is required for the build tooling; the browser bundles have no Node requirement.

Which browsers does it run in?

Current evergreen browsers: Chrome, Edge, Firefox and Safari on desktop, Safari on iOS and Chrome on Android. The builds target ES2017 and run without transpiling or polyfills. Internet Explorer is not supported.

What media does it show?

TypeHow
Imagessrc, srcset and sizes, and <picture> sources for art direction and format negotiation
YouTube, Vimeo and WistiaBy URL. Provider slides load as a poster facade; the provider iframe is created only when the visitor presses play. YouTube uses the privacy-enhanced no-cookie host by default
HTML5 videoMP4, WebM and other formats the browser plays, with poster images
IframesAny page, map or PDF viewer
Inline HTMLAny markup, as a slide
Dynamic contentSlides built from a JavaScript array, added and removed while the gallery is open

How much of the API is there?

Count
Settings158, across the core and 15 plugins
Events22
Methods8
Plugins15
Slide transitions20 and more, switched with one setting

The settings, events and methods references are generated from the source, and the same data is served as JSON at /api/settings.json, /api/events.json and /api/methods.json.

Is it accessible?

The open gallery is a modal dialog with role="dialog" and aria-modal, focus moves into it on open, Tab is trapped while it is open and focus returns to the trigger on close. Slide changes are announced to screen readers, the controls are labelled and translatable, and prefers-reduced-motion disables the animations. All four packages run axe checks against WCAG 2.0 and 2.1 A and AA rules in continuous integration. The accessibility page has the full contract.

Is lightGallery free?

Yes. lightGallery is free and open source under the GPLv3, for personal and commercial projects alike, as long as the project is distributed under GPLv3-compatible terms.

How much does the commercial license cost?

A project that keeps its source proprietary needs a commercial license. It is a one-time payment, the code and every plugin are the same, and there are no feature gates.

LicensePrice (USD, one-time)Covers
Hobby48One developer, one product, not for a product that is sold
Team118Up to eight developers, up to five products, products for sale allowed
Organization188Unlimited developers and products, products for sale allowed
Extended239Unlimited developers, one product that itself produces copies, such as an SDK, site builder, theme or template

Open-source projects under a GPLv3-compatible license can request a free key. The license page has the purchase links and the full terms.

Does a version 2 license cover version 3?

No. A license covers every release within the major version it was bought for, so a 2.x license covers all 2.x releases and version 3 needs a new license. Licenses bought in the six months before the 3.0 release can be exchanged by email. Version 3 keys start with LIG; an older key keeps the gallery working and logs a console warning.

How widely is it used?

Figure
npm downloads of lightgalleryAbout 90,000 a week in October 2026
GitHubAbout 7,000 stars
CDNServed by jsDelivr, cdnjs and unpkg

Where do I get it?

npmnpm install lightgallery, or the framework package plus lightgallery for the stylesheets
CDNhttps://cdn.jsdelivr.net/npm/lightgallery@3/lightgallery.min.js and /css/lightgallery.css, the same paths on cdnjs and unpkg; @3 follows the latest 3.x release
Sourcegithub.com/sachinchoolur/lightGallery
For coding agentsllms.txt, a markdown twin of every docs page at its URL plus index.md, and the agent skill

The getting started guide takes it from here.

Edit this page on GitHub