mcpField
R
render-images-in-cursor

render-images-in-cursor

github.com/davidondrejAgent workflows4.2k35 installsUpdated today
Repository

About render-images-in-cursor

A Cursor skill for making generated images visible by copying them into the open workspace, embedding them in chat, and opening them in an editor tab as a fallback.

Key features

  1. 01Copy images into the workspace
  2. 02Embed images in chat with Markdown
  3. 03Open images in editor tabs
  4. 04Check image visibility with the user

Use cases

  1. 01Showing generated mockups in Cursor
  2. 02Handling unavailable inline image rendering

MCP support

When the cursor-app-control MCP server is available, use its `open_resource` tool to open the workspace image in an editor tab.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davidondrej/skills --skill render-images-in-cursor

After installing, type/render-images-in-cursorin Claude Code to confirm it loaded.

Details

From the project README

Render Images in Cursor

Cursor chat renders an image reliably only when the file lives INSIDE the open workspace. Image tools often save to folders outside it (for example an assets folder under the Cursor projects directory) and claim the image "is already displayed" — the user then sees nothing, with no error. Inline chat rendering is also a newer, rollout-dependent Cursor feature, so always add the editor-tab fallback.

Workflow

  1. Copy the image into the open workspace. Any workspace folder works; prefer the repo's temp folder:
mkdir -p tmp/mockups
cp "$IMAGE_PATH" tmp/mockups/my-image.png
  1. Embed it in the chat reply with plain markdown pointing at the in-workspace file, using its full absolute path:
![Short description](ABSOLUTE-WORKSPACE-PATH/tmp/mockups/my-image.png)

One embed per image, each on its own line, with a bold one-line label above it. Never trust an image tool's "already displayed" output — embed explicitly every time.

  1. Also open each image as an editor tab — guaranteed visible even when inline chat rendering fails. With the cursor-app-control MCP server, call open_resource:
uri = file://ABSOLUTE-WORKSPACE-PATH/tmp/mockups/my-image.png

The file URI must point inside the workspace (or under the user's .cursor folder). Without that MCP server, run cursor tmp/mockups/my-image.png from the workspace root instead.

  1. Verify with the user. Ask whether the images are visible. If inline rendering failed, the editor tabs from step 3 are the fallback — do not just resend the same markdown.

Failure modes

  • Image saved outside the workspace: chat renders nothing, silently. Copy it into the workspace first (step 1) and embed the in-workspace path.
  • Markdown renders as a plain file link, not a picture: the user's Cursor build lacks inline chat images; rely on the editor tabs from step 3.
  • open_resource rejects the URI: the file is outside the workspace; fix the path via step 1.
  • macOS open shows the image in Preview, outside Cursor — last resort only.

Comments

Markdown supported