docs/solutions/logic-errors/2026-04-02-markdown-images-must-not-synthesize-title-from-caption.md
Plate's markdown image serializer treated the caption as both the alt text and
the markdown title. That meant plain images always serialized with an invented
title, and images with a real node.title lost it on the way out.
Instead of this:

Plate produced this:

Serialize markdown image titles from node.title only, and leave title
undefined when the Slate image node does not have one.
The serializer seam changed from this:
const image: MdImage = {
alt: captionText,
title: captionText,
type: 'image',
url,
};
to this:
const image: MdImage = {
alt: captionText,
title: typeof title === 'string' ? title : undefined,
type: 'image',
url,
};
That gives the correct behavior for both cases:


Markdown image syntax has two separate fields:
Plate stores those as separate concepts too:
caption for the visible image labeltitle for the optional markdown titleOnce serialization respects that split instead of copying caption into both
slots, the markdown output stops inventing data and starts round-tripping the
real node state.
These checks passed:
bun test packages/markdown/src/lib/commonmarkSurface.spec.ts packages/markdown/src/lib/defaultRules.spec.ts apps/www/src/__tests__/package-integration/markdown-rich/serializeMd.spec.tsx
pnpm turbo build --filter=./packages/basic-nodes --filter=./packages/core --filter=./packages/markdown
pnpm turbo typecheck --filter=./packages/basic-nodes --filter=./packages/core --filter=./packages/markdown
pnpm lint:fix
#4898