diff --git a/frontend/src/lib/utils/docMarkdown.ts b/frontend/src/lib/utils/docMarkdown.ts
index 9af6d30..5405208 100644
--- a/frontend/src/lib/utils/docMarkdown.ts
+++ b/frontend/src/lib/utils/docMarkdown.ts
@@ -126,11 +126,49 @@ function _protectMath(text: string, slots: string[]): string {
});
}
+// ── 이미지 pre-render ─────────────────────────────────────────────────────────
+// docMarked 의 image 렌더러(.use renderer)가 런타임에 미발화하면 `` 가
+// 기본 `` 로 떨어지고, DOMPurify(ALLOW_UNKNOWN_PROTOCOLS:false)가
+// `docimg:` 를 미지원 프로토콜로 제거 → placeholder 도 이미지도 둘 다 사라진다(수식 토크나이저
+// 미발화와 동형 증상). → marked 가 손대기 전에 image ref 를 placeholder figure 로 직접 변환해
+// 슬롯 보호(렌더러 발화 여부와 무관). 슬롯/복원 메커니즘은 수식과 공유.
+const _IMG_RE = /!\[([^\]]*)\]\(([^)\s]+)\)/g;
+
+function _imagePlaceholder(alt: string, href: string): string {
+ const isInternal = href.startsWith('docimg:');
+ const basename = href.split('/').pop() ?? href;
+ const labelSrc = alt || basename || '이미지';
+ const safeHref = escAttr(href);
+ const safeAlt = escAttr(alt);
+ const safeLabel = escText(`[이미지: ${labelSrc} — 아직 표시되지 않음]`);
+ const internalFlag = isInternal ? '1' : '0';
+ return (
+ `
로 감싸므로 그
를 벗겨 블록 수식이 문단에