Hosting public images from a locked-down Windows box

2 min read HostingWindowsCloudflarejsDelivr

Behind a corporate proxy, wrangler and the throwaway upload hosts all failed. GitHub plus jsDelivr was the dependable free image host.

The symptom

I needed public URLs for a batch of images, specifically to fill the Media URL column of a Pinterest bulk CSV, and I was working from a corporate-proxied Windows machine. Every obvious path either failed outright or produced URLs that did not actually serve the image.

What was actually happening

I tried the usual suspects and each one died in its own way:

  • A hand-rolled Cloudflare Pages direct-upload script created a deployment successfully, so it looked like it worked, but it never stored the asset blobs. The resulting URLs returned HTTP 500. (Wrangler itself was a non-starter here, the proxy blocks it.)
  • catbox.moe returned HTTP 412 “invalid uploader.”
  • 0x0.st returned HTTP 503, uploads were disabled.

So I had a deployment with no bytes behind it, and two throwaway hosts that were down or blocked. The common thread: anything needing an unproxied client connection or a flaky free endpoint was not going to be reliable from this machine.

The fix

GitHub plus jsDelivr. Push the images to a public GitHub repo, then serve them straight off jsDelivr’s CDN. The gh CLI was already authenticated, so this went through the proxy fine:

# images already in ./images on a public repo
gh repo create my-user/pin-images --public --source=. --push

Then the public URL for any file follows a fixed pattern:

https://cdn.jsdelivr.net/gh/<user>/<repo>@main/<path>
# e.g.
https://cdn.jsdelivr.net/gh/my-user/pin-images@main/images/img01.png

Verified with a HEAD request, HTTP 200 and content-type: image/png. It is permanent, CDN-backed, and free. And for the Pinterest case specifically it does not even matter long-term, because Pinterest re-hosts the image on its own servers when the pin is created, jsDelivr just has to serve it once during creation.

The lesson

When wrangler or a direct-upload script is blocked, GitHub plus jsDelivr is a dependable free public static and image host. A public repo and the @main jsDelivr path give you a stable CDN URL without touching any blocked tooling.

Share: X Hacker News Reddit

Related fixes