diff --git a/src/components/ImageWithLightbox/index.tsx b/src/components/ImageWithLightbox/index.tsx index c987107..1616ea6 100644 --- a/src/components/ImageWithLightbox/index.tsx +++ b/src/components/ImageWithLightbox/index.tsx @@ -14,7 +14,8 @@ export default function ImageWithLightbox({ image, className, classNames = {}, - errorPlaceholder + errorPlaceholder, + ignoreAutoLoadPolicy = false }: { image: TImetaInfo className?: string @@ -22,11 +23,12 @@ export default function ImageWithLightbox({ wrapper?: string } errorPlaceholder?: string + ignoreAutoLoadPolicy?: boolean }) { const id = useMemo(() => `image-with-lightbox-${randomString()}`, []) const { t } = useTranslation() const { autoLoadMedia } = useContentPolicy() - const [display, setDisplay] = useState(autoLoadMedia) + const [display, setDisplay] = useState(ignoreAutoLoadPolicy ? true : autoLoadMedia) const [index, setIndex] = useState(-1) useEffect(() => { if (index >= 0) { diff --git a/src/components/Profile/AvatarWithLightbox.tsx b/src/components/Profile/AvatarWithLightbox.tsx index 7685f7d..dfbac13 100644 --- a/src/components/Profile/AvatarWithLightbox.tsx +++ b/src/components/Profile/AvatarWithLightbox.tsx @@ -27,6 +27,7 @@ export default function AvatarWithLightbox({ userId }: { userId: string }) { wrapper: 'shrink-0 rounded-full bg-background w-24 h-24 absolute left-3 bottom-0 translate-y-1/2 border-4 border-background' }} + ignoreAutoLoadPolicy /> ) } diff --git a/src/components/Profile/BannerWithLightbox.tsx b/src/components/Profile/BannerWithLightbox.tsx index 4beda1d..58eeb4c 100644 --- a/src/components/Profile/BannerWithLightbox.tsx +++ b/src/components/Profile/BannerWithLightbox.tsx @@ -28,6 +28,7 @@ export default function BannerWithLightbox({ wrapper: 'rounded-none border-none' }} errorPlaceholder={defaultBanner} + ignoreAutoLoadPolicy /> ) }