]> Untitled Git - lemmy.git/commitdiff
Adding support for webp images on the front end. Fixes #703
authorDessalines <tyhou13@gmx.com>
Fri, 8 May 2020 18:02:06 +0000 (14:02 -0400)
committerDessalines <tyhou13@gmx.com>
Fri, 8 May 2020 18:02:42 +0000 (14:02 -0400)
ui/src/utils.ts

index 2256a0c135b6b2f6a535f3bc21c0d90e4533e5ec..f18d996e89bd56b21544fadb8800041c171c4e19 100644 (file)
@@ -210,7 +210,7 @@ export function isMod(modIds: Array<number>, creator_id: number): boolean {
 }
 
 const imageRegex = new RegExp(
-  /(http)?s?:?(\/\/[^"']*\.(?:jpg|jpeg|gif|png|svg))/
+  /(http)?s?:?(\/\/[^"']*\.(?:jpg|jpeg|gif|png|svg|webp))/
 );
 const videoRegex = new RegExp(`(http)?s?:?(\/\/[^"']*\.(?:mp4))`);