Hi Andy,
I have a followup question to this (which i suspect the original poster will soon run into :)
When you have added a image to the code, how can you prevent the "Browse" button to appear in the properties page. Ie. you add a image from a custom gallery (databasedriven), then right click on that image and select properties and next to the url you now have a browse button. This will not be a good thing if you (like we do) want to prohibit any form of upload except to a database.
Regards,
Henrik