Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 217 Bytes

img.md

File metadata and controls

10 lines (8 loc) · 217 Bytes

Image to base64

const response = await fetch(‘http://img.png’)
const blob = await response.blob()

const reader = new FileReader()
const base64 = await reader.readAsDataURL(blob)
console.log(base64)