Files
lanyard-profile-readme/old/src/toBase64.ts
2024-10-20 19:44:03 +07: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;
};