Maybe you know this, maybe not, but when a web page shows you text all of that text is right there in the source code of the page. But almost always when you see an image it's first just web page instructions of where to get the image, dimensions, maybe some other parameters, and then the image is fetched in a separate network call by the browser as the page is gets loaded. Which is why you sometimes see a blank spot or "loading..." before it's shown.
Which means if you're trying to make a tool for adding an image to your post it is a multi-fold problem, first the image needs to be uploaded to the some server, then you need the formula for that image to insert in your post, and of course type all of the post and save that information on some server.
I used to use one script/page to upload an image, then copy the info for displaying it and paste that into my blog post which was made by a whole new script. Now there's one script ... slightly more elegant, but it ain't as easy as uploading a selfie to IG.