diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 07630a00..2afdb2d5 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -71,9 +71,14 @@ const openAvatar = (url: string) => openImage(url, 512, 512); const openBanner = (url: string) => openImage(url, 1024); function openImage(url: string, width: number, height?: number) { - const format = url.startsWith("/") ? "png" : settings.store.format; - const u = new URL(url, window.location.href); + + const format = url.startsWith("/") + ? "png" + : u.searchParams.get("animated") === "true" + ? "gif" + : settings.store.format; + u.searchParams.set("size", settings.store.imgSize); u.pathname = u.pathname.replace(/\.(png|jpe?g|webp)$/, `.${format}`); url = u.toString();