SlideShow does not stop after the last slide
Author: acwolffCreated Mar 10, 2026Updated Mar 10, 2026
Description
If I start a slide show with setting loop: false, the slide show continues affter the last image with the first image.
Steps to reproduce
See demo album https://andrewolff.jalbum.net/LG_Eerde/
JS code that you use to initialize lightGallery.
const lg = document.getElementById("thumbsgallery");
let plugin = null;
function initGallery() {
plugin = lightGallery(lg, {
showCloseIcon: true,
hideBarsDelay: 3*1000,
showBarsAfter: 3*1000,
autoplayFirstVideo: true,
autoplayVideoOnSlide: true,
slideShowInterval: viewtime,
loop: false,
hideControlOnEnd: true,
speed: transtime,
startAnimationDuration: transtime,
backdropDuration: transtime,
pager: false,// No Pager plugin
hideScrollbar: true,
getCaptionFromTitleOrAlt: false,
appendSubHtmlTo: ".lg-sub-html", // caption onder image
mode: transeffect,
counter: false,
allowMediaOverlap: true,
download: true, // show link always for weblocations, so also if showDownloadLink=false
actualSize: true,
thumbnail: false,
extraProps: ['photodata'],
plugins: [
lgZoom,
lgFullscreen,
lgAutoplay,
lgHash,
lgVideo
],
mobileSettings: {
controls: false, // Hide arrow buttons
},
licenseKey: "Required for commercial sites",
}
)
};
});See also https://andrewolff.jalbum.net/LG_Eerde/res/initGallery.js
### Environment
- Browser and version - Google Chrome Versie 145.0.7632.160 (Officiële build) (64-bits)
- OS - Windows 11
- lightGallery version - lightgallery | 2.9.0 | October 1st 2025
### Additional context
Notice too that hideControlOnEnd: true, is not working.Source: sachinchoolur/lightGallery