1👍
✅
The browser doesn’t have access to local storage like that. Your options are as follows:
1. Store the image "in the browser"
- Using a data URL
- Using the Web Storage API
- Using the IndexedDB API (for bigger files or multiple files)
2. Upload the image to a server that will host it for you and get the URL to that image
Source:stackexchange.com