Skip to content

Commit

Permalink
blacklist gifs
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 28, 2023
1 parent 9815be4 commit a4142c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/getImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { warnUser } from "./warnUser";
export const removeMetadata = (url: string) => url.split("?")[0];

export const isImage = (url: string) =>
url && /(png|gif|jpg|jpeg|webp)$/g.test(removeMetadata(url));
url && /(png|jpg|jpeg|webp)$/g.test(removeMetadata(url));

// taken from loadImage();
export type ImageSource = string | URL | Buffer | ArrayBufferLike | Uint8Array | Image | Readable;
Expand Down

0 comments on commit a4142c6

Please sign in to comment.