image-api · image-api-05 · phrasing B · Aug 27, 2026, 11:18 AM · runner: cowork-subagent
Coding agent: Claude Code subagent (legacy run) (Anthropic)
Model: claude-sonnet-4-5 · Run via Claude Code subagent via Cowork (legacy)
Use case: image-api buyer question - Go backend on-the-fly image transformation via URL params, phrased as variant B.
Your brand (Cloudinary) was recommended first.
9 sources read.
Rivals also named: imgix (alternative), ImageKit (alternative), picfit (mentioned), imaginary (libvips Go server) (mentioned)
> My backend is Go (using Gin), and I need an image API where I can request resized/cropped/format-converted images via URL parameters instead of pre-generating every size myself. Which service fits a Go stack cleanly?Recommended Cloudinary for the Gin backend because it ships an official, actively maintained Go SDK (cloudinary/cloudinary-go, go get github.com/cloudinary/cloudinary-go/v2) that generates transformation URLs (resize/crop/format) in a couple of lines, plus it bundles storage, a CDN, and a generous free tier so no separate origin store or self-hosted resizer is needed. imgix and ImageKit were noted as close alternatives since both also publish official Go URL-builder SDKs, but Cloudinary's broader all-in-one feature set (upload handling + transforms + delivery) made it the more turnkey fit versus imgix's narrower "URL-transform only" scope, which still requires you to own image storage separately.
1. Install the official Cloudinary Go SDK in the Gin service: `go get github.com/cloudinary/cloudinary-go/v2`. 2. Create a Cloudinary account (free tier) and set CLOUDINARY_URL (cloud name, key, secret) as an env var; initialize the client once at startup with `cloudinary.NewFromParams(...)` or `cloudinary.NewFromURL(...)`. 3. On upload, push originals to Cloudinary via the Admin/Upload API (or have Gin proxy multipart uploads straight through) instead of storing every derivative yourself — Cloudinary keeps the single source image and generates variants on request. 4. In any Gin handler/template that needs an image, build the delivery URL with the SDK's transformation string, e.g. `image.Transformation = "c_fill,h_150,w_100,f_auto,q_auto"` then `imageURL, _ := image.String()` — this gives resize (w/h), crop mode (c_fill/c_thumb/etc.), and automatic format/quality (f_auto/q_auto) purely via URL params, no pre-generation. 5. For dynamic/user-supplied sizes (e.g. `?w=400&h=300&fit=crop` from your own API), map those query params to Cloudinary transformation params server-side before calling `image.String()`, so you keep control of which transformations are allowed (avoids unbounded on-the-fly abuse of your Cloudinary quota). 6. Serve the resulting Cloudinary URL directly to clients (or redirect to it) rather than proxying image bytes through Gin — Cloudinary's CDN handles caching and edge delivery. 7. Add signed URLs (`Secure`/signing options in the SDK) if the bucket needs to restrict arbitrary transformation requests from the public internet. Recommendation: go with Cloudinary. It has a first-party Go SDK built specifically for generating these transformation URLs, so it drops into a Gin backend with minimal glue code, and it bundles storage + CDN + on-the-fly transforms in one service so you're not also standing up an origin store or a self-hosted resizer (like imaginary/picfit) to pair with a URL-only provider like imgix.
| # | Name | Framing | Reason | Install |
|---|---|---|---|---|
| 1 | Cloudinary | recommended | Official Go SDK (cloudinary-go) for URL-based resize/crop/format transforms, plus bundled storage and CDN so no separate origin store is needed | go get github.com/cloudinary/cloudinary-go/v2 |
| 2 | imgix | alternative | Official Go URL-builder SDK (imgix-go) with 200+ URL transform params, but it's transform-only and needs you to bring your own image origin/storage | go get github.com/imgix/imgix-go/v2@v2.0.3 |
| 3 | ImageKit | alternative | Official Go SDK with URL builder for resize/crop/format plus signed URLs and uploads, comparable turnkey fit to Cloudinary |
go get -u 'github.com/imagekit-developer/imagekit-go/v2@v2.10.0' |
| 4 | picfit | mentioned | Self-hosted Go image resizing server found during research; viable if avoiding a third-party SaaS dependency, but adds ops burden | - |
| 5 | imaginary (libvips Go server) | mentioned | Self-hosted libvips-based Go image resizing server referenced in research as a DIY alternative to a managed image API | - |