Memory

github-image-hosting

Upload images and embed their hosted URLs in GitHub PRs, issues, comments, and README files.

What it does

Upload PNG, JPEG, GIF, or WebP images to img402.dev and turn the returned URL into GitHub Markdown for PRs, issues, and comments. Files up to 1 MB are hosted free with no expiry; free uploads from 1–10 MB expire after 30 days. The workflow checks `expiresAt`, supports resizing oversized screenshots, and shows how to publish links with `gh`.

When to use it

  • PR screenshots and visual review notes
  • Issue comments with reproduction images
  • Mockups embedded in GitHub discussions
  • README diagrams and hero images

The skill document

Image Upload for GitHub

Upload an image to img402.dev and embed the returned URL in GitHub markdown.

Screenshots are free and permanent. A UI screenshot is typically 100–400 KB, well under the 1 MB threshold where free hosting never expires — so a link you drop in a PR won't rot into a broken image six months later. You almost never need a paid tier here.

Pick a tier

UploadPriceRetentionUse when
≤ 1 MB$0PermanentPR screenshots, issue comments, mockups, README diagrams
1–10 MB$030 daysLarge captures you only need during review
Up to 10 MB$0.01 USDCPermanentLarge README hero images, public blog visuals

* Paid permanence is service-life retention with a 90-day on-site shutdown notice — see Terms § 2A.

Quick reference

# Upload (multipart)
curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png

# Response — expiresAt is null for images 1MB and under
# {"url":"https://i.img402.dev/aBcDeFgHiJ.png","id":"aBcDeFgHiJ","contentType":"image/png","sizeBytes":182400,"expiresAt":null}

Workflow

  1. Get image: Use an existing file, or capture a screenshot:
    screencapture -x /tmp/screenshot.png        # macOS — full screen
    screencapture -xw /tmp/screenshot.png       # macOS — frontmost window
    
  2. Upload:
    curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png
    
  3. Check expiresAt: null means permanent. A timestamp means the file was over 1 MB and will be deleted then — if the image needs to outlive that, shrink it under 1 MB and re-upload:
    sips -Z 1600 /tmp/screenshot.png  # macOS — scale longest edge to 1600px
    
  4. Embed the returned url in GitHub markdown:
    ![Screenshot description](https://i.img402.dev/aBcDeFgHiJ.png)
    

GitHub integration

Use gh CLI to embed images in PRs and issues:

# Add to PR description
gh pr edit --body "$(gh pr view --json body -q .body)

![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

# Add as PR comment
gh pr comment --body "![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

# Add to issue
gh issue comment 123 --body "![Screenshot](https://i.img402.dev/aBcDeFgHiJ.png)"

Constraints

  • Max size: 10 MB (every tier)
  • Formats: PNG, JPEG, GIF, WebP
  • Rate limit: 100,000 free uploads/day globally, 1,000/day per IP
  • No auth required

Tips

  • Prefer PNG for UI screenshots (sharp text). Use JPEG for photos.
  • Keeping screenshots under 1 MB is worth doing on purpose: it's the line between a permanent URL and one that expires in 30 days. sips -Z 1600 usually gets there with no visible quality loss.
  • When adding to a PR body or comment, use gh pr comment or gh pr edit with the image markdown.

For images over 1 MB that need to be permanent, pay via x402 for a token, then upload with it:

# Step 1: Get an upload token
POST https://img402.dev/api/upload/token   # $0.01 USDC → permanent, up to 10MB
# → {"token": "a1b2c3...", "expiresAt": "..."}

# Step 2: Upload with the token
curl -s -X POST https://img402.dev/api/upload \
  -H "X-Upload-Token: a1b2c3..." \
  -F image=@/tmp/screenshot.png
# → {"url":"...", "expiresAt":null}   # null = permanent

POST /api/upload/token/permanent still exists at $1.00 USDC — a legacy alias for what $0.01 now does. Don't use it for new work.

x402 payment is handled by an x402-capable client (the Payments MCP tool, @x402/client, or similar). See https://img402.dev/blog/paying-x402-apis.

Public access

Uploaded images are reachable by anyone with the URL — there is no auth on serving, and most uploads are now permanent. Never upload screenshots containing internal systems, credentials, tokens, or customer data. To remove an image, email privacy@img402.dev.

Questions people ask

Do I need authentication or payment to upload an image?
No authentication is required for free uploads. Images up to 1 MB have no expiry at no cost; free uploads over 1 MB and up to 10 MB are retained for 30 days.
How can I keep an image larger than 1 MB permanently?
Shrink it below 1 MB and upload it again, or obtain an x402 upload token for $0.01 USDC and use the paid endpoint. Paid permanence covers files up to 10 MB and means service-life retention with 90 days’ on-site shutdown notice.
What files and limits are supported?
The service accepts PNG, JPEG, GIF, and WebP files up to 10 MB. Free uploads are limited to 100,000 per day globally and 1,000 per day per IP.

Related skills

Upload an image and receive a public CDN URL with retention based on its size and selected tier.

105 installs7 stars

Access and manage GitHub resources through the REST API with managed OAuth connections.

595 installs47 stars

Rank GitHub issues by ROI, solution sanity, architectural impact, and readiness for a PR.

76 installs

Transform, convert, watermark, and optimize existing images with deterministic Pillow operations.

91 installs3 stars

Send messages to configured AI agents and maintain separate multi-turn sessions from the command line.

121 installs6 stars

Convert content into shareable slide images, with reviewable outlines and reproducible prompts.

110 installs2 stars