mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
6 lines
243 B
TypeScript
6 lines
243 B
TypeScript
import { Image_Size, Image_Formats } from "../types/cdn.ts"
|
|
|
|
export const format_image_url = (url: string, size: Image_Size = 128, format?: Image_Formats) => {
|
|
return `${url}.${format || url.includes('/a_') ? 'gif' : 'jpg'}/?size=${size}`
|
|
}
|