mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
e49a23687e
* refactor!: organize directory structure * fix: avoid stack overflow err * chore: swtch back to std/encoding for base64 * style: format source files
11 lines
256 B
TypeScript
11 lines
256 B
TypeScript
import { ImageFormats, ImageSize } from "../types/types.ts";
|
|
|
|
export const formatImageURL = (
|
|
url: string,
|
|
size: ImageSize = 128,
|
|
format?: ImageFormats,
|
|
) => {
|
|
return `${url}.${format ||
|
|
(url.includes("/a_") ? "gif" : "jpg")}?size=${size}`;
|
|
};
|