diff --git a/studio/frontend/src/features/rag/components/preview-docx-view.tsx b/studio/frontend/src/features/rag/components/preview-docx-view.tsx index e039c90cf5..ab3abbc930 100644 --- a/studio/frontend/src/features/rag/components/preview-docx-view.tsx +++ b/studio/frontend/src/features/rag/components/preview-docx-view.tsx @@ -26,14 +26,20 @@ export const PreviewDocxView: FC<{ target: PreviewTarget; blob: Blob }> = ({ void renderAsync(blob, offscreen, undefined, { inWrapper: true, ignoreLastRenderedPageBreak: true, + // Inline images as base64 data: URIs rather than blob: URLs. + // DOMPurify drops blob: from img src, so blob-backed images would + // vanish after sanitize; data: URIs survive (see ADD_DATA_URI_TAGS). + useBase64URL: true, }) .then(() => { if (cancelled || !ref.current) return; // Keep