Add a button or image button that calls wp functions in the wp-admin

You are searching for Ajax.
This Q&A may give you an idea: Unattaching images from a post.

There are many specialists on the matter here at WPSE, check this search query.

tech