Add pasteImage API to handle paste image