Our wordpress installation is running on a server, that has a quite slow Internet-connection.
Because of that I'm trying to write a plugin that automatically uploads any image a user wants to insert into a blog post to a specific sharehoster and insert the image from the sharehoster instead of a local file.
I want the user to use the normal media upload dialog of wordpress.
Therefore I somehow need to interfere in the process of uploading and saving the image and inserting it to the blog post.
I need to access the uploaded image and need to be able to manipulate the piece of markup-code the uploader adds to the blog post, but I have no clue how to interfere in that process. How can I achieve this?