diff --git a/extensions/ipynb/notebook-src/cellAttachmentRenderer.ts b/extensions/ipynb/notebook-src/cellAttachmentRenderer.ts index 87e14d611da..02166f7d7cd 100644 --- a/extensions/ipynb/notebook-src/cellAttachmentRenderer.ts +++ b/extensions/ipynb/notebook-src/cellAttachmentRenderer.ts @@ -23,7 +23,7 @@ export async function activate(ctx: RendererContext) { const token = tokens[idx]; const src = token.attrGet('src'); const attachments: Record> | undefined = env.outputItem.metadata?.attachments; - if (attachments && src) { + if (attachments && src && src.startsWith('attachment:')) { const imageAttachment = attachments[tryDecodeURIComponent(src.replace('attachment:', ''))]; if (imageAttachment) { // objEntries will always be length 1, with objEntries[0] holding [0]=mime,[1]=b64