mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 17:30:07 +00:00
6 lines
237 B
TypeScript
6 lines
237 B
TypeScript
import { ImageSize, ImageFormats } from "../types/cdn.ts"
|
|
|
|
export const formatImageURL = (url: string, size: ImageSize = 128, format?: ImageFormats) => {
|
|
return `${url}.${format || url.includes("/a_") ? "gif" : "jpg"}/?size=${size}`
|
|
}
|