in reply to mysql auto_incremented id
Because this is Perl, another way and probably my way of doing it would be to add another field called "image_order" or something that simple denotes whence in the sequence the image comes. This would be the field you would want to rename when you add/delete an image.
Cons: When you delete an image you would have to change every single other images "image_order" field to match the new ordering.
Pros: Adding an image to the end is easy :). It's also possible to reorder images to any format you want, or completely random. This would not be possible with some of the other schemes people have suggested, mostly relying on the relationship of the creation date (autoincrement). So you could (somewhat) easily insert images in to the middle or the end or whatever.
Of course this problem seems to cry out for a linked list, but I can't really think of a good way to store one.