Adding webp to regex list. Added function return type for consistency with the rest of the functions (#7649)

This commit is contained in:
André Fernandes
2025-02-05 14:54:52 +00:00
committed by GitHub
parent c3d732a76f
commit 9433975984
+2 -2
View File
@@ -8,8 +8,8 @@ export function getDataUriSize(uri: string): number {
return Math.round((uri.length * 3) / 4)
}
export function isUriImage(uri: string) {
return /\.(jpg|jpeg|png).*$/.test(uri)
export function isUriImage(uri: string): boolean {
return /\.(jpg|jpeg|png|webp).*$/.test(uri)
}
export function blobToDataUri(blob: Blob): Promise<string> {