canvas todataurl is differ in browser (1) 썸네일형 리스트형 이미지 url로 base64 encode 값 구하기 export async function loadImage(url: string) { return new Promise((resolve) => { const img = new Image() img.src = url + "?timestamp=" + new Date().getTime() img.crossOrigin = "Anonymous" img.onload = () => { const canvas = document.createElement("canvas") canvas.height = img.height canvas.width = img.width const ctx = canvas.getContext("2d") if (ctx) { ctx.drawImage(img, 0, 0) const base64 = ca.. 이전 1 다음