added api to the project and request to the extension
Ajax submits to api on image click and works. it works!!