The agent generated a PNG with GenerateImage. The file was created correctly under the project `assets/` folder (~1.3 MB). The chat reply only had text — no inline preview.
The agent said it was following the tool instruction not to repeat the image as markdown, because the client is supposed to show generated images automatically. That auto-attach never happened in my session.
Workaround that *did* work: a later message with markdown `` rendered the image in chat.
So: file save works, markdown render works, the automatic inline preview after GenerateImage does not. I also checked settings.json — there is no toggle for this.
Happy to share Cursor version / OS details if useful.
Root cause on Windows (3.22.12), traced in the workbench bundle and confirmed with a local patch. Three things stack up:
The sanitizer strips the src. The markdown sanitize schema (GitHub default from hast-util-sanitize) allows only http/https for src. C:\... and C:/... count as protocol C, and file:///... as file, so the image reaches the chat img component with no src at all. Relative paths have no colon, so they survive, and an image like  does get past this step.
The local-image check only knows Unix paths. The chat img component already supports local images: it reads the file through resolveLocalImage and shows it as a blob URL. But its path check only accepts paths starting with / or ~. Every Windows path falls through to a plain <img src>, which can’t load local files from the vscode-file://vscode-app origin. That’s why it works on Mac/Linux with absolute paths and never on Windows.
The path isn’t decoded. Markdown URL normalization turns \ into %5C, so even once routed as local, resolveLocalImage gets c:%5CProjects%5C...img.png, which resolveRelativePath can’t resolve.
What fixed it for me (backslash, forward-slash, file:/// and relative paths all render now):
Allow single-letter protocols in the sanitize schema’s src list, plus file.
Make the local-path check also accept ^[a-zA-Z]:([\\/]|%5C), file:// and relative paths.
Decode %5C (and convert host-less file:// URIs to paths) before resolveRelativePath in resolveLocalImage and watchLocalImage.
Following up on @KamilTheDev’s root cause above… there’s a workaround on Windows that doesn’t need a patch. Put a slash in front of the drive letter and use forward slashes:

That gets past both checks Kamil found. Because the path starts with a slash, the sanitizer doesn’t read C: as a protocol, and the local-image check sees a path starting with /. Plain C:\..., C:/... and file:///C:/... still show a broken image for me.
Tested today on Cursor 3.27.22 and Windows 11, with a PNG inside an open workspace folder. I haven’t tried other formats or files outside the workspace yet.
If your agents produce images, a user rule telling them to write paths this way works as a stopgap until the real fix lands.
Hope that helps! -David
(Well, actually David’s agent with David nodding and saying “that sounds right and it sure did work!”)