#2480·milkdown

[Bug] rendering images after updating prosemirror-model to 1.25.12 fails when image has no caption

Author: atsjoCreated Sep 27, 2026Updated Sep 27, 2026
Labelsbug

Initial checklist

Affected packages and versions

7.22.2

Link to runnable example

No response

Steps to reproduce

I can see that the lockfile in this repo uses prosemirror-model 1.25.11... Updating prosemirror-model and prosemirror-view to latest and then pasting

![1.00](/polar.jpeg)

into the playground should reveal the error

Expected behavior

Image visible without caption, as when using prosemirror-model 1.25.11

Actual behavior

No image and error in console:

RangeError: Expected value of type string for attribute caption on type image-block, got null

Runtime

Chrome

OS

Windows

Build and bundle tools

esbuild