0c9ab24f39
Co-Authored-By: Choi Minseo <minseo0388@outlook.com>
11 lines
No EOL
301 B
TypeScript
11 lines
No EOL
301 B
TypeScript
import { ImageFormats, ImageSize } from "../types/cdnTypes.ts";
|
|
|
|
export const ImageURL = (
|
|
url: string,
|
|
format: ImageFormats,
|
|
size?: ImageSize | 128
|
|
) => {
|
|
if (url.includes('a_')) {
|
|
return url + '.gif' + '?size=' + size
|
|
} else return url + '.' + format + '?size=' + size
|
|
} |