lemmy-ui/src/server/utils/fetch-icon-png.ts

8 lines
188 B
TypeScript
Raw Normal View History

import fetch from "cross-fetch";
export async function fetchIconPng(iconUrl: string) {
return await fetch(iconUrl)
.then(res => res.blob())
.then(blob => blob.arrayBuffer());
}