mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 12:27:16 +00:00
13 lines
265 B
TypeScript
13 lines
265 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;
|
|
} |