It's quite easy. It is possible and the plus is if you would like it to be show at a certain area, just whip the code inside a function block and call the function whenever you would like. Try making one on your own, making scripts is good practice. It makes for better programmers. Here are a few hints.
Use:
-Database(optional)
-Pass variables to the dynamic page.
-Make a function. (optional)
-Use loops.
Of course then again, most of all the scripts out there use the above things. Though just take time to think about it.
Pass the name, folder location, total images to the "dynamic" page then incorporate a loop to print out all the images.