Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
Gathering detailed insights and metrics for lightgallery
A customizable, modular, responsive, lightbox gallery plugin.
npm install lightgallery
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.7
Supply Chain
98.4
Quality
78.7
Maintenance
100
Vulnerability
80.9
License
Version 2.8.3 release
Updated on Mar 01, 2025
Version 2.8.2 release
Updated on Nov 28, 2024
Version 2.8.1 release
Updated on Nov 13, 2024
Version 2.8.0-beta.2 release
Updated on Apr 25, 2024
Version 2.8.0-beta.1 release
Updated on Nov 27, 2023
Version 2.7.2 release
Updated on Sep 20, 2023
TypeScript (72.03%)
JavaScript (12.98%)
SCSS (9.71%)
HTML (3.79%)
Vue (1.36%)
CSS (0.13%)
Total Downloads
11,413,078
Last Day
2,006
Last Week
57,532
Last Month
275,199
Last Year
3,557,307
NOASSERTION License
6,743 Stars
1,189 Commits
1,297 Forks
138 Watchers
13 Branches
78 Contributors
Updated on Jun 09, 2025
Minified
Minified + Gzipped
Latest Version
2.8.3
Package Id
lightgallery@2.8.3
Unpacked Size
6.39 MB
Size
1.20 MB
File Count
468
NPM Version
6.14.8
Node Version
16.14.2
Published on
Mar 03, 2025
Cumulative downloads
Total Downloads
No dependencies detected.
A customizable, modular, responsive, lightbox gallery plugin. No dependencies.\ Available for React.js, Angular, Vue.js, and typescript.
lightGallery is available on NPM, Yarn, Bower, CDNs, and GitHub. You can use any of the following method to download lightGallery.
NPM - NPM is a package manager for the JavaScript
programming language. You can install lightgallery
using the following
command
1npm install lightgallery
YARN - Yarn is another popular package manager for the JavaScript programming language. If you prefer you can use Yarn instead of NPM
1yarn add lightgallery
Bower - You can find lightGallery on Bower package manager as well
1bower install lightgallery --save
GitHub - You can also directly download lightgallery from GitHub
CDN - If you prefer to use a CDN, you can load files via jsdelivr, cdnjs or unpkg
First of all, include lightgallery.css in the <head> of the document. If you want include any lightGallery plugin such as thumbnails or zoom, you need to include respective css files as well.
Alternatively you can include lightgallery-bundle.css
which contains
lightGallery and all plugin styles instead of separate stylesheets.
If you like you can also import scss files instead of css files from the scss
folder.
1<head> 2 <link type="text/css" rel="stylesheet" href="css/lightgallery.css" /> 3 4 <!-- lightgallery plugins --> 5 <link type="text/css" rel="stylesheet" href="css/lg-zoom.css" /> 6 <link type="text/css" rel="stylesheet" href="css/lg-thumbnail.css" /> 7 8 9 <!-- OR --> 10 11 <link type="text/css" rel="stylesheet" href="css/lightgallery-bundle.css" /> 12</head>
Then include lightgallery.umd.js into your document. If you want to include any lightgallery plugin you can include it after lightgallery.umd.js.
1<body> 2 .... 3 4 <script src="js/lightgallery.umd.js"></script> 5 6 <!-- lightgallery plugins --> 7 <script src="js/plugins/lg-thumbnail.umd.js"></script> 8 <script src="js/plugins/lg-zoom.umd.js"></script> 9</body>
lightGallery supports AMD, CommonJS and ES6 modules too.
1import lightGallery from 'lightgallery'; 2 3// Plugins 4import lgThumbnail from 'lightgallery/plugins/thumbnail' 5import lgZoom from 'lightgallery/plugins/zoom' 6
lightgallery does not force you to use any kind of markup. you can use whatever markup you want. Here can find detailed examples of different kinds of markups.
If you know the original size of the media, you can pass it via
data-lg-size="${width}-${height}"
attribute for the initial
zoom animation.
But, this is completely optional.
1<div id="lightgallery"> 2 <a href="img/img1.jpg" data-lg-size="1600-2400"> 3 <img alt=".." src="img/thumb1.jpg" /> 4 </a> 5 <a href="img/img2.jpg" data-lg-size="1024-800"> 6 <img alt=".." src="img/thumb2.jpg" /> 7 </a> 8 ... 9</div>
Finally, you need to initiate the gallery by adding the following code.
1<script type="text/javascript"> 2 lightGallery(document.getElementById('lightgallery'), { 3 plugins: [lgZoom, lgThumbnail], 4 speed: 500, 5 licenseKey: 'your_license_key' 6 ... other settings 7 }); 8</script>
You'll receive a license key via email one you purchase a license More info
As shown above, you need to pass the plugins via settings if you want to use any lightGallery plugins.
If you are including lightGallery files via script tag, please use the same plugins names as follows.
lgZoom
, lgAutoplay
, lgComment
, lgFullscreen
, lgHash
, lgPager
,
lgRotate
, lgShare
, lgThumbnail
, lgVideo
, lgMediumZoom
lightGallery supports all major browsers including IE 10 and above.
If you want to use lightGallery to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Read more about the commercial license
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3.
If you have any questions, suggestions, feedback, please reach out to contact@lightgalleryjs.com or DM me on twitter
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/25 approved changesets -- score normalized to 2
Reason
1 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
222 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-02
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
3.8%
2,006
Compared to previous day
Last Week
-16.4%
57,532
Compared to previous week
Last Month
-16.6%
275,199
Compared to previous month
Last Year
23%
3,557,307
Compared to previous year