Files
lanyard-profile-readme/src/toBase64.ts
2021-06-22 14:10:58 -04:00

14 lines
268 B
TypeScript

import imageToBase64 from "image-to-base64";
export const encodeBase64 = async (url: string): Promise<string> => {
let response = "";
try {
response = await imageToBase64(url);
} catch (e) {
console.log(e);
}
return response;
};