diff options
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/image-proxy.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/image-proxy.ts b/app/lib/image-proxy.ts new file mode 100644 index 0000000..b9af3bf --- /dev/null +++ b/app/lib/image-proxy.ts @@ -0,0 +1,4 @@ +export function proxyImageUrl(url: string | null | undefined): string | null { + if (!url) return null; + return `/api/image?url=${encodeURIComponent(url)}`; +} |
