This question already has an answer here:
I am developing a plugin and i want to add my own button to the wordpress media upload interface (WP version 3.5). Right next to the standard 'insert into page' button, i want my button to be there, let's call it 'insert special image'.
Can anyone point me in the right direction, where should i look? which WP source files are defining the functionality of this button?
Basically my 'insert special image' button should do pretty much the same thing like the standard 'insert into page' button - take an attachment and insert it into post, only with some added data.