diff --git a/ui/src/components/photoGallery/ProtectedMedia.tsx b/ui/src/components/photoGallery/ProtectedMedia.tsx index 305f16d6..326217da 100644 --- a/ui/src/components/photoGallery/ProtectedMedia.tsx +++ b/ui/src/components/photoGallery/ProtectedMedia.tsx @@ -13,7 +13,7 @@ const placeholder = const getProtectedUrl = (url?: string) => { if (url == undefined) return undefined - const imgUrl = new URL(url, location.origin) + const imgUrl = new URL(`${import.meta.env.BASE_URL}/${url}`, location.origin) const tokenRegex = location.pathname.match(/^\/share\/([\d\w]+)(\/?.*)$/) if (tokenRegex) {