We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e70747c commit 799ecc3Copy full SHA for 799ecc3
1 file changed
src/plugins/fixImagesQuality/index.tsx
@@ -74,11 +74,10 @@ export default definePlugin({
74
const url = new URL(src);
75
if (!url.pathname.startsWith("/attachments/")) return;
76
77
- if (freeze) {
78
- url.searchParams.set("animated", "false");
79
-
80
- if (url.pathname.endsWith(".gif"))
81
- url.searchParams.set("format", "webp");
+ url.searchParams.set("animated", String(!freeze));
+ if (freeze && url.pathname.endsWith(".gif")) {
+ // gifs don't support animated=false, so we have no choice but to use webp
+ url.searchParams.set("format", "webp");
82
}
83
84
const isModal = !!trigger;
0 commit comments