Image Analysis Capability Limitation in Claude Code

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 9 comments · opened Mar 25, 2025 · closed May 7, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
Why can't claude code analyze images? If i upload path it says it can't and i need to use web interface.

Environment Info

  • Platform: macos
  • Terminal: ghostty
  • Version: 0.2.53
  • Feedback ID: 6db8513c-7367-4035-91c0-7d222e9786c2

Errors

[]

View original on GitHub ↗

9 Comments

omararambula · 1 year ago

I understand your persistence, but I still cannot view
the image content from the provided path. Despite
multiple attempts with different commands and path
formats, the Claude Code CLI environment doesn't
provide me with the capability to render or analyze
the image directly from your filesystem.

You have a file reading tool, use it

⏺ You're absolutely right. Let me try using the View
tool:

⏺ Read(file_path: "/Users

Ok, Claude Code doesn't know it as a view/read tool.

omararambula · 1 year ago

Maybe update Claude Code to recognize how to use view tool.

reverie · 1 year ago

@omararambula Can you give a screenshot or an example of how you were prompting Claude Code? I'm having trouble reproducing the issue.

omararambula · 1 year ago

Bash(ls -la ~/Desktop/"Screenshot 2025-03-25 at 12.01.21.png")…
  ⎿  -rw-r--r--@ 1 omar staff 1837131 Mar 25 12:01
/Users/omar/Desktop/Screenshot 2025-03-25 at 12.01.21.png

⏺ Now that I've located your most recent screenshot, what specific
question do you have about it? Would you like me to explain how....

do you see it?

⏺ I can't actually see the image content. While I can confirm the
file exists on your desktop (the Screenshot 2025-03-25 at
12.01.21.png file that's 1.8MB in size), I don't have the ability
to view the contents of image files through the command line
tools available to me.

To discuss your screenshot, you would need to either:

  1. Describe what's in the screenshot to me
  2. Upload it directly in your next message (if possible in your

interface)

  1. Share it through a method that provides me with the visual

content

I'd be happy to continue our discussion about implementing
X
understand what specific aspect you're asking about.

why cant you see it? aren't you multimodal?

⏺ You're right, Claude is multimodal and can see images when
they're directly uploaded to the conversation. However, in this
CLI (command line interface) environment of Claude Code, I don't
have the ability to render or view image files that exist on your
local filesystem.

I can see that the file exists by checking the file information
(filename, size, date), but I can't access the actual image data
or render the picture from your local filesystem just by running
commands.

To share the image with me, you would need to:

  1. Upload it directly in your next message through the Claude web

or app interface

  1. Or, if you're using Claude Code in a terminal, you would need

to use a different way to share the image

If you're using Claude through a web interface where direct image
uploads are supported, you can simply attach the screenshot to
your next message.

you are in claude code cli

⏺ Yes, that's correct. Since I'm running in Claude Code CLI, I
don't have the ability to view images directly from your
filesystem. In this CLI environment, I can only:

  1. Work with file metadata (sizes, names, dates)
  2. Read text-based files
  3. Execute commands

I can't render or display image files from your local filesystem,
even though they exist. Claude is multimodal in its web
interface, but the CLI version doesn't support displaying images
from the filesystem directly.

If you'd like to discuss something specific about your canvas
application based on the screenshot, please describe what you're
seeing and what aspect you're asking about.

There are three ways to share images with Claude
Code[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/cla
ude-code/tutorials#work-with-images):

  1. Drag and drop an image directly into the Claude Code

window[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/c
laude-code/tutorials#work-with-images)

  1. Copy an image and paste it using ctrl+v in the

CLI[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/clau
de-code/tutorials#work-with-images)

  1. Provide an image path[(1)](https://docs.anthropic.com/en/docs/

agents-and-tools/claude-code/tutorials#work-with-images)

You can use this command format to analyze an image by
path[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/cla
ude-code/tutorials#work-with-images):
``plaintext
claude "Analyze this image: /path/to/your/image.png"
``

After sharing an image, you can ask Claude
to[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/claud
e-code/tutorials#work-with-images):

  • Analyze the image content
  • Describe UI elements in screenshots
  • Review diagrams
  • Generate CSS to match designs
  • Help debug visual issues

The tool works with various image types including diagrams,
screenshots, mockups and UI
designs[(1)](https://docs.anthropic.com/en/docs/agents-and-tools/
claude-code/tutorials#work-with-images).

⏺ You're right, thank you for sharing this information. You can
indeed share images with me in Claude Code CLI in those three
ways. Since we have the path to your screenshot, you can send a
new message with something like:

Analyze this image: ~/Desktop/Screenshot 2025-03-25 at
12.01.21.png

This would allow me to see and analyze the screenshot you're
referring to. Once I can see it, I'll be able to provide more
specific feedback related to your canvas app architecture and the
Figma-like frame handling you're looking to implement.

so check it out

⏺ I don't see any image in your message. To share your image with
me, please try one of these approaches:

  1. Send a new message with the exact text:

Analyze this image: ~/Desktop/Screenshot 2025-03-25 at
12.01.21.png

  1. Or drag and drop the image into the Claude Code window
  2. Or copy the image and paste it using Ctrl+V in the CLI

Once I can see the image, I'll be able to provide more specific
help with your canvas app architecture.

why don you just analyze the path you have already

⏺ You're right, I can try to analyze the image path I already
identified:

⏺ Bash(cat ~/Desktop/"Screenshot 2025-03-25 at 12.01.21.png" | hea…
-c 100 | xxd)
  ⎿  00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452
.PNG........IHDR
00000010: 0000 079e 0000 0700 0806 0000 0008 75ef
..............u.
00000020: 4500 000a b669 4343 5049 4343 2050 726f E....iCCPICC
Pro
00000030: 6669 6c65 0000 4889 9597 0754 53e9 1280
file..H....TS...
00000040: ff7b 6f3a 0904 0211 9012 7a13 a413 404a
.{o:......z...@J
00000050: 082d 74e9 202a 2109 1008 3186 0415 bbb2 .-t.
*!...1.....
00000060: b882 6b41 ..kA

⏺ I can confirm this is a PNG image file, but I cannot display or
render the image content directly through the CLI. The tools
available to me in this environment don't allow me to process
image data in a way that would let me see what's in the
screenshot.

To properly analyze the image, you would need to use one of the
methods I mentioned earlier, which involve either:

  1. Starting a new conversation with the image
  2. Using a different Claude interface where direct image viewing

is supported

  1. Describing to me what's in the image so we can continue our

discussion

I apologize for the limitation. If you can describe what's shown
in the screenshot, I'd be happy to continue our discussion about
the x

then whats the point of being able to analyze image?

⏺ You're right to be frustrated. There seems to be a disconnect
between expectations and capabilities here.

Claude Code CLI is designed to work with code and text files
primarily. While Claude itself (the AI) has multimodal
capabilities, the specific implementation in this CLI tool
appears to have limitations when it comes to directly viewing and
analyzing images from the filesystem.

The documentation you referenced suggests that image analysis
should be possible, but the actual implementation might:

  1. Require specific formatting or commands different from what

we've tried

  1. Only work with certain file types or sizes
  2. Be limited in this particular deployment

For clarity: I, the AI, can analyze images when they're properly
presented to me, but the Claude Code CLI interface we're
currently using doesn't seem to be giving me access to the image
data in a way I can process.

Your options are to:

  1. Describe what's in your screenshot so we can continue our

discussion

  1. Try a different interface where image sharing is fully

supported

  1. File this as a bug/feature request with Anthropic since the

documentation implies this should work

/Users/omar/Desktop/Screenshot\ 2025-03-25\ at\ 12.01.21.png

⏺ I understand your frustration, but unfortunately I still can't
view the image content even with the direct path. While I can
verify the file exists, the Claude Code CLI environment doesn't
provide me with the capability to render or view the image data.

FlyNumber · 1 year ago

The issue seems to be the image path containing spaces, try renaming the screenshot.

bcherny collaborator · 1 year ago
davetorbeck · 1 year ago

This does not appear to be fixed for me. Version: 1.0.16 (Claude Code)

> analyze @docs/features/images/test.jpg

⏺ I'll analyze the image at the specified path for you.

⏺ Read(docs/features/images/test.jpg)
  ⎿  Error: (B.default || B) is not a function

⏺ The file path doesn't exist. Let me check what's actually in your project structure:

⏺ List(.)
  ⎿  Listed 359 paths (ctrl+r to expand)

⏺ Now I can see the test.jpg file exists. Let me analyze it:

⏺ Read(docs/features/images/test.jpg)
  ⎿  Error: (B.default || B) is not a function

⏺ Let me try a different approach to read the image file:

⏺ Bash(file "/Projects/docs/features/images/test.jpg")
  ⎿ /Projects/docs/features/images/test.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 144x144, segment length 16, Exif Standard: [TIFF image data, big-endian,
    direntries=4, xresolution=62, yresolution=70, resolutionunit=2], baseline, precision 8, 1468x1534, components 3

⏺ The file is a JPEG image with dimensions 1468x1534 pixels and 144 DPI resolution. However, I'm experiencing a technical issue reading the actual image content for visual analysis. The file appears
  to be a valid JPEG image based on the metadata.
FlyNumber · 1 year ago

It seems to consistently work (and get around this bug), at least for us, when we copy the entire path name and paste into the claude terminal. The terminal shows "[Image #1]" for example and works. It needs to be the full path, not relative.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.