From 0e72b85978138c56df7e28286c6c5abdbe1e0f4e Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Thu, 22 Aug 2024 14:06:31 +0700 Subject: [PATCH] fix: do not resolve srcset for urls (#6367) Signed-off-by: Alexander Onnikov --- packages/presentation/src/preview.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/presentation/src/preview.ts b/packages/presentation/src/preview.ts index ed22aada99..dd9f06a7c1 100644 --- a/packages/presentation/src/preview.ts +++ b/packages/presentation/src/preview.ts @@ -54,6 +54,10 @@ export function getSrcSet (_blob: Ref, width?: number): string { } function blobToSrcSet (cfg: PreviewConfig, blob: Ref, width: number | undefined): string { + if (blob.includes('://')) { + return '' + } + let url = cfg.previewUrl.replaceAll(':workspace', encodeURIComponent(getCurrentWorkspace())) const downloadUrl = getFileUrl(blob)