# imgd.dev blog

Practical image hosting guides for developers, automation tools, and AI agents.

HTML index: https://imgd.dev/blog/

## Getting started

- [How to Create a Temporary Image URL and Restore the Same Link](https://imgd.dev/blog/temporary-image-url-api/) — Upload with unpublish_after_hours, confirm the public URL becomes a 404, then publish the hash again to restore the same URL.
  - Markdown: https://imgd.dev/blog/temporary-image-url-api/index.md
- [How to Generate Alt Text During an Image Upload](https://imgd.dev/blog/image-upload-alt-text-api/) — Upload the image, poll GET /v1/images/:hash for at most 20 attempts, and use alt_text only when the terminal status is live.
  - Markdown: https://imgd.dev/blog/image-upload-alt-text-api/index.md
- [How to Turn a Screenshot Into a URL From the Command Line](https://imgd.dev/blog/screenshot-to-url-command-line/) — Capture a PNG file, upload it as the multipart file field, and print the returned imgd.dev URL.
  - Markdown: https://imgd.dev/blog/screenshot-to-url-command-line/index.md
- [How to Upload an Image With cURL and Get a Public URL](https://imgd.dev/blog/upload-image-curl-public-url/) — Send a POST request to https://imgd.dev/v1/upload with the file field, then read the public URL from the JSON response.
  - Markdown: https://imgd.dev/blog/upload-image-curl-public-url/index.md

## Languages

- [Upload an Image With Go](https://imgd.dev/blog/upload-image-go/) — Create a multipart file part with its real image media type, send it with net/http, decode success or error JSON, and verify the result.
  - Markdown: https://imgd.dev/blog/upload-image-go/index.md
- [Upload an Image With JavaScript and Node.js](https://imgd.dev/blog/upload-image-javascript-nodejs/) — Read the image with Node.js, append a typed Blob to FormData as file, send it with fetch, and validate HTTP 200 or 202.
  - Markdown: https://imgd.dev/blog/upload-image-javascript-nodejs/index.md
- [Upload an Image With PHP cURL](https://imgd.dev/blog/upload-image-php/) — Use PHP CURLFile to post an image as the file form field, then validate the JSON response and public URL.
  - Markdown: https://imgd.dev/blog/upload-image-php/index.md
- [Upload an Image With Python Requests](https://imgd.dev/blog/upload-image-python-requests/) — Open the image in binary mode, send it as the multipart file field with requests, surface the server fix, and verify the result.
  - Markdown: https://imgd.dev/blog/upload-image-python-requests/index.md
- [Upload an Image With Ruby Net HTTP](https://imgd.dev/blog/upload-image-ruby/) — Use Ruby Net HTTP and set_form to upload an image without an external upload gem.
  - Markdown: https://imgd.dev/blog/upload-image-ruby/index.md
- [Upload an Image With Rust and reqwest](https://imgd.dev/blog/upload-image-rust/) — Use reqwest to send a multipart file field to the imgd.dev upload endpoint and read the public URL from typed JSON.
  - Markdown: https://imgd.dev/blog/upload-image-rust/index.md
- [Upload an Image With TypeScript](https://imgd.dev/blog/upload-image-typescript/) — Model success and API-error JSON, parse the response as unknown, narrow it with type guards, and accept HTTP 200 or 202.
  - Markdown: https://imgd.dev/blog/upload-image-typescript/index.md

## Automation workflows

- [Add Hosted Images to Markdown and README Files](https://imgd.dev/blog/host-images-markdown-readme/) — Upload one image, copy its public URL, and insert it with non-empty Markdown alt text in a README.
  - Markdown: https://imgd.dev/blog/host-images-markdown-readme/index.md
- [Host Images for HTML Email Without Base64](https://imgd.dev/blog/host-images-html-email/) — Upload the image before email delivery, then reference its public URL from an HTML img element instead of embedding base64 data.
  - Markdown: https://imgd.dev/blog/host-images-html-email/index.md
- [Host Puppeteer Screenshots on a Public URL](https://imgd.dev/blog/puppeteer-screenshot-upload/) — Use Puppeteer Page screenshot with a file path, close the browser in finally, then upload the PNG with Node fetch.
  - Markdown: https://imgd.dev/blog/puppeteer-screenshot-upload/index.md
- [How to Let Claude Code, Codex, or Cursor Upload Screenshots](https://imgd.dev/blog/ai-coding-agent-upload-screenshot/) — Expose IMGD_KEY through the host environment and give the coding agent a shell script that accepts one image path and prints one public URL.
  - Markdown: https://imgd.dev/blog/ai-coding-agent-upload-screenshot/index.md
- [How to Upload Playwright Failure Screenshots From GitHub Actions](https://imgd.dev/blog/playwright-screenshots-github-actions/) — Set Playwright screenshots to only-on-failure, guard the upload by failure and file existence, and write the returned URL to GITHUB_STEP_SUMMARY.
  - Markdown: https://imgd.dev/blog/playwright-screenshots-github-actions/index.md
- [Post a Hosted CI Screenshot in a GitHub Pull Request Comment](https://imgd.dev/blog/github-pr-screenshot-comment/) — Run untrusted pull request code with a read token, then upload and comment only from a separate trusted job.
  - Markdown: https://imgd.dev/blog/github-pr-screenshot-comment/index.md
- [Resize and Convert a Hosted Image to WebP or AVIF by URL](https://imgd.dev/blog/resize-convert-image-webp-avif/) — Add w and fmt query values to one public image URL to request resized WebP, AVIF, JPEG, or PNG output.
  - Markdown: https://imgd.dev/blog/resize-convert-image-webp-avif/index.md
- [Store OpenAI-Generated Images on a Stable Public URL](https://imgd.dev/blog/store-openai-generated-images/) — Decode the image_generation_call result from base64, then upload the PNG bytes to imgd.dev for a content-addressed public URL.
  - Markdown: https://imgd.dev/blog/store-openai-generated-images/index.md
- [Upload a Python Chart and Embed It in a Report](https://imgd.dev/blog/python-chart-public-url/) — Save a fixed Matplotlib chart as PNG, upload it with Requests, then print a public URL with useful report markup.
  - Markdown: https://imgd.dev/blog/python-chart-public-url/index.md

## Choosing a host

- [Image Hosting APIs Without a Subscription](https://imgd.dev/blog/image-hosting-api-without-subscription/) — Use imgd.dev for one-time storage, img402 for free or per-image uploads, or a competitor free plan for a limited monthly quota.
  - Markdown: https://imgd.dev/blog/image-hosting-api-without-subscription/index.md
- [imgd.dev vs Cloudinary: Simple Agent Uploads or a Full Media Platform?](https://imgd.dev/blog/imgd-vs-cloudinary/) — Choose imgd.dev for a small public-image API with one-time storage. Choose Cloudinary for video, DAM, teams, and broad transformation workflows.
  - Markdown: https://imgd.dev/blog/imgd-vs-cloudinary/index.md
- [imgd.dev vs img402: Reusable Storage or Per-Image Payment?](https://imgd.dev/blog/imgd-vs-img402/) — Choose img402 for no-account free uploads or $0.01 per-image payment. Choose imgd.dev for reusable storage, image management, and content-addressed URLs.
  - Markdown: https://imgd.dev/blog/imgd-vs-img402/index.md
- [Imgur API Alternatives for Automated Screenshots](https://imgd.dev/blog/imgur-api-alternatives-automation/) — Imgur has an API and can remain best for its community and account workflows. Choose an alternative when direct automation is the main task.
  - Markdown: https://imgd.dev/blog/imgur-api-alternatives-automation/index.md
- [What Is the Best Image Host for AI Agents?](https://imgd.dev/blog/best-image-hosting-api-ai-agents/) — There is no universal best image host for AI agents. Choose imgd.dev for simple paid public storage, or choose a competitor for its specific strength.
  - Markdown: https://imgd.dev/blog/best-image-hosting-api-ai-agents/index.md

## Engineering

- [How Actionable API Errors Help AI Agents Recover](https://imgd.dev/blog/actionable-api-errors-ai-agents/) — Branch on both HTTP status and the stable error code. Show the server fix verbatim, and retry only transient failures.
  - Markdown: https://imgd.dev/blog/actionable-api-errors-ai-agents/index.md
- [How to Moderate Terminal Screenshots Without Treating Error Text as Violence](https://imgd.dev/blog/moderate-terminal-screenshots-text-false-positives/) — Judge what a terminal screenshot depicts, not the words it contains. Require independent confirmation before a destructive moderation action.
  - Markdown: https://imgd.dev/blog/moderate-terminal-screenshots-text-false-positives/index.md
- [Image Moderation Thumbnail Size: Cost Versus Readability](https://imgd.dev/blog/image-moderation-thumbnail-size-cost-accuracy/) — imgd.dev uses MODERATION_EDGE_PX = 768 in production. The old 256-pixel setting was cheaper but made a wide screenshot unreadable.
  - Markdown: https://imgd.dev/blog/image-moderation-thumbnail-size-cost-accuracy/index.md
- [Make Image Upload Retries Safe With Content-Addressed URLs](https://imgd.dev/blog/image-upload-retry-content-hash/) — Retry only network failures, HTTP 429, and server failures. Reuse identical bytes so imgd.dev returns the same SHA-256 hash and public URL.
  - Markdown: https://imgd.dev/blog/image-upload-retry-content-hash/index.md
- [Why imgd.dev Serves a Blurred Placeholder During Image Moderation](https://imgd.dev/blog/blurred-placeholder-image-moderation/) — imgd.dev returns the final public URL immediately, but it does not serve unreviewed recognizable bytes. Processing is temporary; review is terminal.
  - Markdown: https://imgd.dev/blog/blurred-placeholder-image-moderation/index.md
