Skip to content

[bug] Claude Code API Error After Screenshot of Large Page #817

@ColeMurray

Description

@ColeMurray

After taking a screenshot with full page for a long page, claude code is unable to handle the large image due to exceeding the max image dimensions (8000 pixels).

⏺ playwright - Take a screenshot (MCP)(filename: "homepage.png", fullPage: true)
  ⎿  ### Result
     Took the full page screenshot and saved it as /tmp/playwright-mcp-output/2025-08-01T00-37-01.779Z/homepage.png

     ### Ran Playwright code
     ```js
     // Screenshot full page and save it as /tmp/playwright-mcp-output/2025-08-02T00-37-01.779Z/homepage.png
     await page.screenshot({
       fullPage: true,
       path: '/tmp/playwright-mcp-output/2025-08-01T00-37-01.779Z/homepage.png',
       quality: 50,
       scale: 'css',
       type: 'jpeg'
     });
     ```

  ⎿  [Image]

17:41
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.5.image.source.base64.data: At least one of the image dimensions exceed
    max allowed size: 8000 pixels"}}

Metadata

Metadata

Assignees

No one assigned

    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