diff --git a/src/index.tsx b/src/index.tsx index 823e0e8..1fbf59c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -19,7 +19,11 @@ type CacheEntry = { export class ImageCache { private getPath(uri: string, immutable?: boolean): string { - const ext = uri.substring(uri.lastIndexOf(".")); + const ext = + uri.indexOf("?") === -1 ? + uri.substring(uri.lastIndexOf(".")) + : + uri.substring(uri.lastIndexOf("."), uri.indexOf("?")); if (immutable === true) { return dirs.CacheDir + "/" + SHA1(uri) + ext; } else {