why not to use a plugin like nextgen-gallery?
You can ask the plugin to scan a dir to build a gallery, then are many possibilities to display the images.
If this cannot be a solution you need to access via php directly the filesystem, not difficult but some work needed 😉