I have an image saved on firebase that I'd like to convert to base64 and save as base64 in a JSON file. I can't cache because of conditional rendering. I have no problem getting the URL from firebase and even rendering it on the screen, but I don't want to have it download a new copy every single time when I can just save it and get it from my save. Here's my code:
promiseResponse = await storageRef.child("burgerimg.jpg").getDownloadURL()
.catch(err => handleError(err));
console.log(promiseResponse)
It returns
https://firebasestorage.googleapis.com/v0/b/my-app-name.appspot.com/o/burgerimg.jpg?alt=media&token=adkjfk3jkl2j3jrklj4324el
Just to re-iterate: what I want to do is get the image from that URL and convert it to base64, then save it to a JSON object.