From da11b4ee2750d7cee114d0ab27e19a2be608ab60 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 14 Jun 2026 20:46:54 -0400 Subject: [PATCH] UserPFP: Dont set animated if not from img repo --- src/equicordplugins/userpfp/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/equicordplugins/userpfp/index.tsx b/src/equicordplugins/userpfp/index.tsx index 65117dfad..57d350aa4 100644 --- a/src/equicordplugins/userpfp/index.tsx +++ b/src/equicordplugins/userpfp/index.tsx @@ -20,13 +20,14 @@ import { openInviteModal } from "@utils/discord"; import definePlugin, { OptionType } from "@utils/types"; import { User } from "@vencord/discord-types"; import { extractAndLoadChunksLazy } from "@webpack"; -import { IconUtils, Menu, openModal,UserStore } from "@webpack/common"; +import { IconUtils, Menu, openModal, UserStore } from "@webpack/common"; import { SetAvatarModal } from "./AvatarModal"; const cl = classNameFactory("vc-userpfp-"); const DONO_URL = "https://ko-fi.com/coolesding"; const INVITE_LINK = "userpfp-1129784704267210844"; +const USERPFP_IMG_URL = "https://raw.githubusercontent.com/UserPFP/img"; export const requireSettingsModal = extractAndLoadChunksLazy(['type:"USER_SETTINGS_MODAL_OPEN"']); export const KEY_DATASTORE = "vencord-custom-avatars"; @@ -135,9 +136,11 @@ export default definePlugin({ try { const res = new URL(avatarUrl); - res.searchParams.set("animated", animated ? "true" : "false"); - if (!animated) { - res.pathname = res.pathname.replaceAll(/\.gifv?/g, ".png"); + if (avatarUrl.startsWith(USERPFP_IMG_URL)) { + res.searchParams.set("animated", animated ? "true" : "false"); + if (!animated) { + res.pathname = res.pathname.replaceAll(/\.gifv?/g, ".png"); + } } return res.toString(); } catch {