XF 2.2 XF Picture Upload Source


Hi Everyone,
i would like to create an addon with an alternativ pictureupload-implementation (i would like to do some tasks after upload the picture and befor insert it to the editor).
Where could i find the original code of insert a picture on the editor?
Or a hook after upload?
Its my first addon so i unfortunately have no experiance how is the architecture of xenforo.