1. Use a canvas

2. Use matrix screenshots

Note that there may be some problems with capturing images on ios, so be sure to check the base library. Context. DrawImage () allows you to upload a local path to capture images. Draw (true,()=>{}) to ensure that the image is drawn successfully. I’m returning a path and file name extension.