coopster - 11:28 pm on Jun 18, 2012 (gmt 0)
or inclusive the image itself into the database and then just get all the images that belong to that id.
This is my favored approach to the dilemma. It's easy to allow your user to connect all kinds of images then to a certain identifier. As far as slideshow code goes, you can pre-load the page with the images (or thumbnails) or you could use an asynchronous call (AJAX) to retrieve them on the fly.