diff --git a/src/http.ts b/src/http.ts index 529b58f..3fb3a36 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1879,7 +1879,7 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction("/api/v4/image", { + const response = await this.#fetchFunction(this.#buildFullUrl("/image"), { ...options, method: HttpType.Post, body: formData as unknown as BodyInit, @@ -1899,12 +1899,15 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction("/api/v4/account/avatar", { - ...options, - method: HttpType.Post, - body: formData as unknown as BodyInit, - headers: this.#headers, - }); + const response = await this.#fetchFunction( + this.#buildFullUrl("/account/avatar"), + { + ...options, + method: HttpType.Post, + body: formData as unknown as BodyInit, + headers: this.#headers, + }, + ); return response.json(); }