Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Fidel Torres
Fidel Torres
25,286 Points

My Library of Images...

Hello, I want to know if there is a possibility of creating something likes this. Lets assume that I got a folder with multiples images an "X" # of images... so what I want is to load each picture on my website automatically depending on the number of pictures lets say X=10 then I get 10 pictures on my website!!!! please let me know, Thanks in advance guys.

Fidel Torres
Fidel Torres
25,286 Points

I would get solutions if there is any but using JS...

1 Answer

Kevin Korte
Kevin Korte
28,148 Points

You might be able to try this and modify the loop to return what you need. Another option is to load images into a database and than query the database. That would be commom if you were using a CMS.

http://stackoverflow.com/questions/14194173/count-number-of-files-in-folder-in-php