I’m new to this forum.
And I got a question and hope you guys can help me out with it.
I have a folder with quite some images (.jpg files) and want to display them on a webpage.
So I want to show them as small thumbnails so the page loads faster.
To do this manual takes to much time.
There are many useful tricks to do with jQuery.
I have been searching quite a lot but couldn’t find the answer and so that’s why I’m asking for help here.
The most tedious part is getting the names into a text file. Being an oldtimer, I would DIR > file.txt From there, you can manipulate it to create an array of image names, rename the file to *.js, and use it in your page
So I want to show them as small thumbnails so the page loads faster.
The best way is to create a thumbnail when the original is uploaded. Either in a different folder or with a prefix like th_
If the photos are already on your server you can use some code like GD or Imagemagick to create thumbnails of them all.
I would use glob() to select all the thumbnails into an array and build the page from that array. You could include a link to a larger size image; this would be less than 10 lines of code in php.