Create a base64 image from a fetch image

I would like to fetch an image and generate a base64 from it

this is what I have:

const res = await fetch('')
  const blob = await res.blob();

everywhere on google they say to use FileReader, but it doesn’t exist in the service workers.

Any idea how to resolve it?


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.