WT Lightbox2.js
By Sergey Tolkachyov
Libraries
This plugin is for Joomla developers. The plugin registers Lightbox2.js (https://lokeshdhakar.com/projects/lightbox2/#getting-started) package in Joomla Web Assets Manager. Then you can use it in your extensions.
To do this in your code, use:
use Joomla\CMS\Factory;
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->usePreset('lightbox2')->useScript(&...