Images in mysql to php to xml displayed in flash

I checked out this nice tutorial here

I’d like to take it a step further by being able to display images as well. A la all the xml photo gallerys ya see here on kirupa. What’s the best way to store images in a mysql db and how do i get that info into the xml to display in flash. I know this is a tall order but any little help is appreciated. thanks!

Or is it better to have a script upload the jpgs to a folder on the server and then just store the address of the image in mysql?