I'm trying to build a slideshow something like this.
html:
<div class="wrapper">
</div>
css:
.wrapper {
background-image: url(dynamic_image_url);
}
dynamic_image_url
is a file in a specific directory.
What I want to implement on the js side is randomly access the next image in a directory by clicking a button.
I'm not sure whether it's a backend or frontend work. I found some information related to Node.js, but I'm not sure that's what I need. I have little background knowledge about backend.
Also, I try to build this using Vue (if that matters).
So my main question is: how do I access the filename maybe by looping through a directory?
edit: I won't know the exact filenames of those images because I might add new images in the directory, and I don't want to rename the images or manually add that name in an array or so.