View attachment 5123
What does the number between the two attachment tags for the image represent? The number of images on the forum?
The attachment ID. You won't get an assigned ID until you upload the attachment.
You're approaching this from entirely the wrong angle at the moment. You can't hook into the forum's upload process, and indeed no forum would want you uploading a new copy of the same attachment every time the canned speech is used. Instead, the image should be hosted elsewhere (e.g. photobucket, your own website, etc. etc.), and then linked to using IMG tags. This is how all canned speeches work, and nobody will have any problems with this: it is how it's always been, and how it always will be.
Finally, before you attempt to attach the images to a single post somewhere, and link to them from many posts, that won't work as well as you hope it might. At best you'll tie it down to a single forum (canned speeches need to be as cross-forum as possible), at worst it will be visible only to admins.