Skip to content

On macOS, copying an image file from Finder results in pasting a generic image icon, instead of the image data #4004

Closed as not planned

Description

@jdanbrown

Description

On macOS:

  1. Good: When I copy (cmd+c) raw image data (like taking a screenshot to the clipboard, or open an image file in Preview and cmd+a, cmd+c to copy the image content), then pasting it into opencode using ctrl+v/cmd+v works correctly
  2. Bug: When I copy (cmd+c) an image file from Finder (i.e. select a file in Finder, press cmd+c), then pasting it into opencode using ctrl+v doesn't work correctly — the llm says it sees a generic image icon instead of the image data
    • Another bug: cmd+v does nothing when an image file is on the clipboard, whereas cmd+v works when image data is on the clipboard
  3. Good: When I drag-drop an image file from Finder into opencode (cli in VS Code terminal), then the llm (Haiku 4.5) decides to read the path, and opencode read's the path, and then the llm gets the image data

Tested using this image of a big inflatable duck:

Chat session:

  ┃
  ┃  what's in this image? [Image 1]
  ┃
  ┃   img  clipboard
  ┃
  ┃  danb (2:47:21 PM)
  ┃

     This image shows a massive inflatable rubber duck in a parking lot. The giant yellow duck has a bright orange bill and a dark eye, and it dwarfs
     the surrounding area—you can see cars, buildings, and trees in the background that are tiny in comparison. There are people standing near it for
     scale, and the parking lot has blue and yellow barrier markers around it. The sky is partly cloudy and blue, making for a striking backdrop. This
     appears to be some kind of public art installation or promotional event.

     Build anthropic/claude-haiku-4.5

  ┃
  ┃  what's in this image? [Image 1]
  ┃
  ┃   img  clipboard
  ┃
  ┃  danb (2:48:01 PM)
  ┃

     This is a file icon representing a JPG image file. The icon shows a white document with a folded corner, and features a magnifying glass over a
     preview of a coastal landscape photo (showing ocean, rocks, and sky). Below the icon is the text "JPG" indicating the file format. This is a
     typical macOS or generic desktop icon used to represent JPEG image files.

     Build anthropic/claude-haiku-4.5

  ┃
  ┃  what's in this image? '/Users/danb/Desktop/image.jpg'
  ┃  danb (2:49:47 PM)
  ┃

     I'll read that image file for you.

     → Read ../Desktop/image.jpg

     This is the same giant inflatable rubber duck image from earlier. It shows a massive yellow duck with an orange bill and dark eye in a parking lot.
      The duck is surrounded by blue and yellow parking barriers, with small groups of people standing nearby for scale. In the background, you can see
     parked cars, buildings, and trees under a partly cloudy blue sky. It's clearly a large public art installation or promotional event.

     Build anthropic/claude-haiku-4.5

OpenCode version

1.0.36

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 15.5

Terminal

VS Code terminal

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 6, 2025
  2. changed the title [-]On macOS, copying an image file in Finder results in pasting a generic image icon, instead of the image data[/-] [+]On macOS, copying an image file from Finder results in pasting a generic image icon, instead of the image data[/+] on Nov 6, 2025
  3. self-assigned this
    on Nov 7, 2025
  4. thdxr commented on Nov 7, 2025

    @thdxr
    Member

    i laughed so hard at the response. i'll fix

  5. jdanbrown commented on Nov 22, 2025

    @jdanbrown
    ContributorAuthor

    In 1.0.104, copy/pasting an image file from Finder now results in pasting just the filename (e.g. duck) instead of any kind of image data. Copy/pasting the raw image data still works correctly (like screenshot to clipboard, or cmd+a, cmd+c in Preview).

  6. connorads commented on Jan 6, 2026

    @connorads
    Contributor

    Hey @jdanbrown I had the same issue with VS Code on macOS with copying image files.
    I made a fix #6127, but it's not merged yet.

    If you want to test it yourself you can try checking out the PR/branch and running bun dev and then pasting your image.

    Feel free to thumbs it up etc. and hopefully we can get it merged

  7. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  8. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions