I'm outputting three thumbnails with data-slide
attributes on the page and use dynamic mode to populate the gallery with more images.
It works fine, however when I open the gallery by clicking on the second/third thumbnail and press the next arrow, the gallery goes to the first slide instead of the next.
Demo code can be found here: https://jsfiddle.net/ebatron/56rpLaby/4/