diff --git a/web/src/api/types/preferences/preferences.ts b/web/src/api/types/preferences/preferences.ts index 7259c9f..05b849f 100644 --- a/web/src/api/types/preferences/preferences.ts +++ b/web/src/api/types/preferences/preferences.ts @@ -55,7 +55,7 @@ export const preferences = { }), show_media_previews: new Preference({ displayName: "Show image and video previews", - description: "If disabled, images and videos will only be visible after clicking and will not be downloaded automatically.", + description: "If disabled, images and videos will only be visible after clicking and will not be downloaded automatically. This will also disable images in URL previews.", allowedContexts: anyContext, defaultValue: true, }), diff --git a/web/src/ui/timeline/URLPreviews.tsx b/web/src/ui/timeline/URLPreviews.tsx index 5798ccf..a7e8fd8 100644 --- a/web/src/ui/timeline/URLPreviews.tsx +++ b/web/src/ui/timeline/URLPreviews.tsx @@ -28,6 +28,8 @@ const URLPreviews = ({ event, room }: { }) => { const client = use(ClientContext)! const renderPreviews = usePreference(client.store, room, "render_url_previews") + // TODO support blurhashes and clicking to view image previews here? + const showPreviewImages = usePreference(client.store, room, "show_media_previews") if (event.redacted_by || !renderPreviews) { return null } @@ -72,7 +74,7 @@ const URLPreviews = ({ event, room }: { {title}
{p["og:description"]}
- {mediaURL && (inline + {mediaURL && showPreviewImages && (inline ?
{mediaContainer}
: mediaContainer)}