Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Load Images from folder

Community Beginner ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

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

Views

2.0K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 02, 2017 Dec 02, 2017

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

...

Votes

Translate
Community Expert ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

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 ?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

Have a look at this answer javascript - How to use bootstrap modal on multiple images on same page on image click? - Stack Over...

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

LATEST

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

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

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 & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

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 & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

the OT talks about a local folder... so I thought that it was on the OT machine... not on a remote one ? Sorry I miss understood

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines