Heh, yeah, I kinda forgot about SQL backend possibility.
My recommendation about category delete and the images accompanying it? Delete them, too. At least for the time being.
Of course, say if you added a delete hyperlink just after "Edit" hyperlink on the categories page, using the edit/pop-up window as a template, turn the background red (instead of white) and have in big, bold capital? white? lettering:
BY USING THIS DELETE OPTION YOU WILL BE ALSO DELETING ALL ACCOMPANYING IMAGES RELATED TO THIS CATEGORY. Do you want to continue? yes/no buttons.
The other option would be to say, create a special category (eg. 0 - this of course assumes that categories use integers as ids, begining @ 1) and, when a image category is 0, the image becomes "unattached" to any category, and thus could be assigned one. Unfortunately, this would require a whole new interface tool that would likely include thumbnail browsing capabilities with category pulldown selection lists beneith each thumbnail (at least, that is how I would envision it). Which, in turn, would take alot more work.
Of course, this isn't my project - so don't let me tell you what to do!
Cheers!
PS: Keep up the good work!