Image Attachments Fail When AppData Is Redirected To Network Share

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Image attachments fail on Windows when %APPDATA% / workspaceStorage is redirected to a network share due to CSP blocking vscode-file://fileserver/...

Steps to Reproduce

  1. Use Cursor on Windows where %APPDATA% / Roaming AppData is redirected to a network share.
  2. Open Cursor Chat or Agent.
  3. Try to add a valid PNG/JPG image.
  4. Cursor shows Failed to add image. The image format is not supported.

I reproduced this in both Agent Window and normal editor window.

Expected Behavior

Cursor should successfully attach the image, or store/cache it using a URL allowed by the app’s CSP.

Operating System

Windows 10/11

Version Information

Version: 3.8.23
Commit: 7cf19b7482706625cdb70db3211b7dd035b7aa30
Date: 2026-06-23T14:57:42.334Z
Layout: editor
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Cursor/3.8.23 Chrome/144.0.7559.236 Electron/40.10.3 Safari/537.36

Additional Information

Image Attachments Fail When AppData Is Redirected To Network Share

Title

Image attachments fail on Windows when %APPDATA% / workspaceStorage is redirected to a network share due to CSP blocking vscode-file://fileserver/...

Environment

  • OS: Windows 10
  • Cursor version: 3.8.23 stable
  • Layout: unifiedAgent
  • AppData/Roaming is redirected by Windows/company policy to a network personal folder
  • Original Cursor user data path resolves under a network share:
    .../AppData/Roaming/Cursor/User/workspaceStorage/...

In many enterprise Windows environments, %APPDATA% can point to a network share because Roaming AppData is managed through Folder Redirection, Roaming User Profiles, or Group Policy. This is usually controlled by IT policy rather than manually configured by the user.

Problem

Adding any image to Cursor Chat/Agent fails with:

Failed to add image. The image format is not supported.

This happens even with valid small PNG/JPG images, including images placed at simple local paths such as:

C:\test.png
C:\Users\<username>\Documents\test.png

The image itself is valid and readable. The error message appears to be misleading.

Reproduction

  1. Use Cursor on Windows where %APPDATA% / Roaming AppData is redirected to a network share.
  2. Open Cursor Chat or Agent.
  3. Try to add a valid PNG/JPG image.
  4. Cursor shows Failed to add image. The image format is not supported.

I reproduced this in both Agent Window and normal editor window.

Expected Behavior

Cursor should successfully attach the image, or store/cache it using a URL allowed by the app’s CSP.

Actual Behavior

Cursor first loads the selected image successfully as a blob: URL, but then copies/caches it into workspaceStorage/images/ under the redirected network AppData location. It then tries to load the cached image through a vscode-file://fileserver/... URL, which is blocked by CSP.

Relevant console log:

Loading the image 'vscode-file://fileserver/NetworkShare/.../AppData/Roaming/Cursor/User/workspaceStorage/.../images/test-xxxx.png'
violates the following Content Security Policy directive:
"img-src 'self'
    data:
    blob:
    vscode-remote-resource:
    vscode-managed-remote-resource:
    https:".
The action has been blocked.

Then Cursor logs:

[imageUtils] Error loading image
Failed to add image. The image format is not supported.

Additional debugging showed that the initial image load works:

URL.createObjectURL File test.png image/png
img.src = blob:vscode-file://vscode-app/...
img load naturalWidth: 960 naturalHeight: 1280

The failure only occurs after Cursor tries to load the cached image from:

vscode-file://fileserver/NetworkShare/.../workspaceStorage/.../images/test-xxxx.png

Diagnosis

This appears to be a CSP/resource URL issue, not an image format issue.

Cursor’s CSP allows:

'self'
data:
blob:
vscode-remote-resource:
vscode-managed-remote-resource:
https:

But it does not allow the generated network-backed cached image URL:

vscode-file://fileserver/...

So in environments where Roaming AppData is redirected to a network share, Cursor’s image attachment pipeline stores the image in a location that later becomes blocked by Cursor’s own CSP.

Workaround

Starting Cursor with a local user data directory fixes the issue:

Cursor.exe --user-data-dir "C:\CursorUserData"

After using a local --user-data-dir, image upload works normally.

Suggested Fix

Possible fixes:

  • Store temporary image attachment cache in a local app data/temp location that does not resolve to vscode-file://fileserver/....
  • Convert the cached image back to blob: / data: before loading it in imageUtils.
  • Allow the correct managed resource scheme for this cached image path.
  • Improve the error message, because this is not actually an unsupported image format.

Does this stop you from using Cursor

No - Cursor works, but with this issue