Can you generate swiper slides dynamically from a folder of images

It looks like this should be possible based on the swiper having a dynamic source field. I just can’t get the steps to make an individual slide with an anchor image so that the lightbox is also invoked when a slide is clicked. Am I missing something obvious or is this beyond the scope of the swiper.

Thanks,
Rick

Hello Rick,

Please check the following tutorial explaining how to get the contents of a folder on your page:

It’s the same for dynamic swiper, just skip the part where this toturial shows how to list the files on the page and use the dynamic data source in the Swiper UI instead.

1 Like

Teodor, hello

Server type: NodeJS

The image folder is located in a non-public area. This is done specifically so that the image can only be seen by users with certain access.

The documentation has a guide on how to download a file using a server action. But what if you just need to show it (without downloading it)? How can this be implemented?

I’m trying to achieve this through a Folder List. But so far without success. It is also not clear how to use this function to show only a specific image or several images?

Perhaps I am going the wrong way and the implementation is carried out by a different approach?

Thank you in advance for your help.

You can’t show the images in the browser when they are not in the public folder. Folder list won’t return an url value for them.
You can download them, using the download action - making a secure download, but not display them.

1 Like