M
M
MoffunW2022-01-23 00:11:28
JavaScript
MoffunW, 2022-01-23 00:11:28

How can I create slides from 400 local images in slick-slider without manually?

Hello! I have a lot of photos that I'm going to use in slick-slider.
Manually driving in file names (even if they are ordinal) looks unreasonable.

Please advise how this can be done?
I'm new to development, map comes to mind, but then I don't understand how I should do it with files.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Froggyweb, 2022-01-23
@Froggyweb

ordinal ones are made simply by a cycle or js or a template engine. Browser js does not have access to files, so you need to use server js (node.js) or another server-side language
400 slides - not a very good idea. there will be brakes.

S
sashabeep, 2022-01-24
@sashabeep

400 slides. Let's change this tab.
The easiest option is to get a list of files in PHP using scandir and pass it through foreach. But you can't do that. Such a large gallery can only be displayed as a grid of thumbnails, and even divided into pages

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question