Skip to main content
This topic has been closed for replies.
Correct answer Nancy OShea

I'm doing it with PHP code and the latest Fancybox which is a very nice modal viewer.

Alt-Web Demo : Dynamic Photo Gallery with Bootstrap, PHP & Fancybox

I should also mention that Fancybox supports the image srcset.  I didn't use it in this demo mainly because I don't have small medium and large images yet.  But when I do, I will add it to the code.  

Fancybox documentation is well-worth reading too because there's a lot more you can do with it. 

fancyBox - touch enabled, responsive and fully customizable lightbox script

Nancy

3 replies

Nancy OShea
Community Expert
Community Expert
November 30, 2017

jamieh2os  wrote

I'm looking for code to load many images to html from local folder...thanks

You could this dynamically on the server with PHP scripts.

Nancy O'Shea— Product User & Community Expert
B i r n o u
Legend
December 1, 2017
Nancy OShea
Community Expert
Community Expert
December 1, 2017

If you're building a client-side application like an image editor, sure.  But for routine things like a web site photo gallery, PHP code takes care of it automatically when you add or delete images from the folder.

Nancy O'Shea— Product User & Community Expert
Preran
Community Manager
Community Manager
November 30, 2017

Like Birnou said, we need more info about your requirement

- What is it that you are trying to do?

- How are you doing it?

- What is the expected result?

Thanks,

Preran

B i r n o u
Legend
November 30, 2017

what do you nean... could you send us more details...?

is it an AJAX function ? a gallery ? looking in a folder ? loading from a list JSON? XML?

do you want to upload the files to the server... using drag and drop ?

jamieh2os
jamieh2osAuthor
Known Participant
December 2, 2017

Thanks for all your responses to my issue.  To further explain, I'm  making a css grid of 25 plus images.  i have a modal I'm using in the code; that uses clicks to open and close each image.  it works when using one image file.  I'm proceeding to code in modal scripts for each image by making unique variables on the scripts; because I'm having problems with the click to close not working from modal script when I have more than one image.  All images are local.  It seems using a script to load into an array to serve modal from image folder is better than using modals for each image..  Perhaps there is a better approach to this plan.   I plan to upload to host when website is done.  All suggestions are greatly appreciated.

BenPleysier
Community Expert
Community Expert
December 2, 2017
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!