From 30a205cdefe48f7ccf1ed2a3d08a12bdc0776340 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 8 Jun 2024 17:19:30 -0700 Subject: [PATCH] 0.19.4: add support for proxied images --- src/lib/components/lemmy/post/helpers.ts | 1 + .../lemmy/post/media/PostMediaCompact.svelte | 8 ++++++-- src/lib/components/ui/Avatar.svelte | 19 +++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/lib/components/lemmy/post/helpers.ts b/src/lib/components/lemmy/post/helpers.ts index df4e079a..0d5c59e6 100644 --- a/src/lib/components/lemmy/post/helpers.ts +++ b/src/lib/components/lemmy/post/helpers.ts @@ -41,6 +41,7 @@ export const optimizeImageURL = ( ) return url.toString() } catch (e) { + console.log(e) return urlStr } } diff --git a/src/lib/components/lemmy/post/media/PostMediaCompact.svelte b/src/lib/components/lemmy/post/media/PostMediaCompact.svelte index 2a842f7c..20de39ca 100644 --- a/src/lib/components/lemmy/post/media/PostMediaCompact.svelte +++ b/src/lib/components/lemmy/post/media/PostMediaCompact.svelte @@ -1,5 +1,9 @@ -{#if url} +{#if optimizedURL}