for each image, but surely that would be terribly a lot of code for such a simple thing?
But there's an extra layer on top of this: that is I want AJAX to load / do the deleting without the page reloading. Other wise I could have done it by a link with the id=$id, but would that work with AJAX?
Personally, I would say that's one of the prime areas to use AJAX. After all, once you delete a single item via a text link, the page will reload and return to the very top of the page, making you scroll back down to where you deleted the item from (if you can remember). At the very least people should be using check-boxes to delete many at a time.
Use Prototype to do the AJAX call and actual deletion of the row upon success. You would be able to do it in 10 minutes, with 10 lines of code -- max!
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Personally, I don't like the delete one-at-a-time thing. When I build cms's I put a little checkbox next to the record so that multiple items can be selected and deleted at once, it also gives the opportunity to present an 'are you sure you want to delete these records' sort of prompt.