Skip to content

v1 cannot process issues with JPEGs in them #495

@AnthonyRonning

Description

@AnthonyRonning

Describe the bug
Claude GitHub Action fails with an API error when processing GitHub issues that contain uploaded images. The error indicates a media type mismatch where the base64 image data doesn't match the expected PNG format.

To Reproduce
Steps to reproduce the behavior:

  1. Create a GitHub issue in a repository with Claude GitHub Action enabled
  2. Upload an image directly to the issue (drag and drop or paste)
  3. Mention @claude in the issue to trigger the action
  4. Claude responds with an API error about image format mismatch

Expected behavior
Claude should be able to process issues containing images, either by:

  • Correctly handling various image formats (JPEG, PNG, etc.)
  • Gracefully skipping image content if unable to process
  • Converting images to the correct format before sending to the API

Screenshots
The error message received:

{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01WnM9ZBxs2vCwhKiSdzoJmn","type":"tool_result","content":[{"type":"image","source":{"type":"base64","data":"/9j/4AAQSkZJRgABAQAASABIAAD/4QBARXhpZgAATU0AKgAAAA
...
                                                                                                                                                                                                                       
  API Error: 400 {                                                                                                                                                                                                                                   
    "type":"error",                                                                                                                                                                                                                                  
    "error":{                                                                                                                                                                                                                                        
      "type":"invalid_request_error",                                                                                                                                                                                                                
      "message":"messages.1.content.6.image.source.base64.data: Image does not match the provided media type image/png"                                                                                                                              
    },                                                                                                                                                                                                                                               
    "request_id":"req_011CSYPDcYC4wR98Ljz3ke1u"                                                                                                                                                                                                      
  }                                                                                                                                                                                                                                                  

API Provider

[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context

  • The issue appears to be related to how the GitHub Action processes embedded images in issues
  • The base64 image data appears to be JPEG format (based on the /9j/ header which is typical for JPEG) but is being sent with a PNG media type
  • This prevents Claude from analyzing issues that contain screenshots or other visual content
  • Action version: @v1 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions