diff --git a/src/matrixeventprocessor.ts b/src/matrixeventprocessor.ts
index a9c06d1730650c06dc32261b2456e07b2b791953..dd90f241dbc98dd2aaa5ca3396fe2fb516d111c7 100644
--- a/src/matrixeventprocessor.ts
+++ b/src/matrixeventprocessor.ts
@@ -530,6 +530,10 @@ export class MatrixEventProcessor {
                 DISCORD_AVATAR_HEIGHT,
                 "scale",
             );
+            log.info(avatarUrl);
+            avatarUrl = avatarUrl.replace(this.bridge.botClient.homeserverUrl, "");
+            log.info(avatarUrl);
+            log.info(this.bridge.botClient.accessToken);
             // eslint-disable-next-line @typescript-eslint/naming-convention
             const res = await this.bridge.botClient.doRequest("GET", avatarUrl, { allow_remote: true }, null, undefined, true, undefined, true);
             const contentType = res.headers["content-type"];