---
title: "WT Lightbox2.js web asset for Joomla developers - WebTolk websites development, Joomla Extensions"
description: "This plugin is for Joomla developers. The plugin registers Lightbox2.js package in Joomla Web Assets Manager. Then you can use it in your extensions."
url: "https://web-tolk.ru/en/dev/joomla-plugins/wt-lightbox2-js"
date: "2026-06-08T15:29:17+00:00"
language: "en-GB"
---

![WT Lightbox2.js for Joomla developers](https://web-tolk.ru/images/swjprojects/projects/72/en-GB/cover.webp)

---

# WT Lightbox2.js for Joomla developers

- **Categories:** [Joomla plugins](https://web-tolk.ru/en/dev/joomla-plugins), [Joomla 4 - Joomla 6extensions](https://web-tolk.ru/en/dev/rasshireniya-dlya-joomla-4), [Web Assets](https://web-tolk.ru/en/dev/web-assets)
- **Version:** 2.12.0
- **Date:** 02 March 2026

3749 3764 CTR 100% Plg Free

[Download](https://web-tolk.ru/en/get?element=wtlightbox2js)[Versions](https://web-tolk.ru/en/dev/joomla-plugins/wt-lightbox2-js/versions)[Documentation](https://lokeshdhakar.com/projects/lightbox2/#getting-started)[GitHub](https://github.com/lokesh/lightbox2)[JED](https://extensions.joomla.org/extension/core-enhancements/libraries/wt-lightbox2-js/)

This plugin is for Joomla developers. The plugin registers Lightbox2.js package in Joomla Web Assets Manager. Then you can use it in your extensions.

![WT Lightbox2.js for Joomla developers](https://web-tolk.ru/images/swjprojects/projects/72/en-GB/icon.webp)

## Description

## Getting started with Lightbox2 and Joomla

Plugin for Joomla developers. It allows you to use [Lightbox2.js](https://lokeshdhakar.com/projects/lightbox2/#getting-started) anywhere in Joomla 4: in modules, components, plugins.

To do this in your code, use:

```
<?php
use Joomla\CMS\Factory;

$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->usePreset('lightbox2')->useScript('jquery');
```

Ligthbox2 needs in jQuery library for work.

The plugin can be used as a dependency when developing your own extensions for Joomla 4. The plugin uses the Joomla 4 update system.

### Initialize with HTML

**Single images.** Add a `data-lightbox` attribute to any image link to enable Lightbox. For the value of the attribute, use a unique name for each image. For example:

```
<a href="/images/image-1.jpg" data-lightbox="image-1" data-title="My caption">Image #1</a>
```

*Optional:*

- Add a `data-title` attribute if you want to show a caption.
- Add a `data-alt attribute` if you want to set the alt attribute of the linked image.

**Image sets.** If you have a group of related images that you would like to combine into a set, use the same data-lightbox attribute value for all of the images. For example:

```
<a href="/images/image-2.jpg" data-lightbox="roadtrip">Image #2</a>
<a href="/images/image-3.jpg" data-lightbox="roadtrip">Image #3</a>
<a href="/images/image-4.jpg" data-lightbox="roadtrip">Image #4</a>
```

### Options

If you want to change any of the default options, call the option method.

```
<script>
    lightbox.option({
      'resizeDuration': 200,
      'wrapAround': true
    })
</script>
```

## Joomla

 **Extension type:** Plugin **Folder:** System **Joomla version:** 4.0.0, 5.1.4, 6.0.3

## Gallery

![...](https://web-tolk.ru/en/dev/joomla-plugins/images/swjprojects/projects/72/en-GB/gallery/jixkXtyp7VA.webp)

## What's new

 2026-03-02 11:04:51

Addition

### v.2.12.0

Upgrade to version 2.12.0

---

## Related extensions

[!\[WT JSwiper - SWiper.js for Joomla developers\](https://web-tolk.ru/images/swjprojects/projects/51/en-GB/icon.webp) WT JSwiper - SWiper.js for Joomla developers](https://web-tolk.ru/en/dev/joomla-plugins/wt-jswiper)

[!\[WT Content Image Gallery\](https://web-tolk.ru/images/swjprojects/projects/73/en-GB/icon.webp) WT Content Image Gallery](https://web-tolk.ru/en/dev/joomla-plugins/wt-content-image-gallery)

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/joomla-plugins",
                "name": "Joomla plugins"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "name": "WT Lightbox2.js for Joomla developers"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "images/webtolk-1080p.jpg",
                "contentUrl": "images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-lightbox2-js",
            "name": "WT Lightbox2.js web asset for Joomla developers - WebTolk websites development, Joomla Extensions",
            "description": "This plugin is for Joomla developers. The plugin registers Lightbox2.js package in Joomla Web Assets Manager. Then you can use it in your extensions.",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/SoftwareApplication/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "SoftwareApplication",
            "name": "WT Lightbox2.js for Joomla developers",
            "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-lightbox2-js",
            "description": "This plugin is for Joomla developers. The plugin registers Lightbox2.js package in Joomla Web Assets Manager. Then you can use it in your extensions.",
            "applicationCategory": "Joomla plugins",
            "softwareVersion": "2.12.0",
            "downloadUrl": "https://web-tolk.ru/en/get?element=wtlightbox2js",
            "image": "https://web-tolk.ru/images/swjprojects/projects/72/en-GB/icon.webp",
            "operatingSystem": "ANY",
            "interactionStatistic": [
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/DownloadAction",
                    "userInteractionCount": 3749
                },
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/ViewAction",
                    "userInteractionCount": 3765
                }
            ],
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-lightbox2-js"
            },
            "softwareRequirements": "Joomla",
            "applicationSubCategory": "Joomla plugins, Joomla 4 - Joomla 6extensions, Web Assets",
            "isAccessibleForFree": true
        }
    ]
}
```
