Repo-hosted images on Cloudflare Pages
Repo-hosted images on Cloudflare Pages
Role
Tier 1 origin in the family's 4-tier image-host chain.
The default image storage for everything that fits naturally in the
repo — blog-post screenshots, hero images, og:image source files,
diagrams, icons. The image lives next to the .mdx file that
embeds it; deploy of the site is deploy of the image.
This is the natural pair for the markdown-in-repo-only CMS lock.
Free tier
- Cloudflare Pages free plan ships unlimited bandwidth on static assets — image bytes count against the same envelope as the HTML they ship with, no separate billing surface
- 500 builds / month per project (well clear of family scale)
- 25 MB hard limit per asset (the rare > 25 MB asset falls to Tier 4 GitHub user-content)
- Files served from the same edge as the rest of the site — no cross-origin DNS hop, no CORS dance
Card / subscription required?
NO. This rides the existing Pages free plan; no extra signup, no card.
How it works
- Author drops
hero.pngintooriz-blog-site/posts/2026-06-20/next topost.mdx. - MDX embeds it:
<Image src="./hero.png" alt="..." />. - Build emits
/posts/2026-06-20/hero.pngat the deploy. - Cloudflare Pages serves it from its edge, alongside the HTML.
- The 3-tier image-CDN chain wraps the origin URL with transforms (
/cdn-cgi/image/...) for resize / format conversion.
Card / subscription required?
NO. Free.
Alternatives
- ImgBB — Tier 2 fallback, used when the image shouldn't bloat the repo
- Imgur — Tier 3 mirror
- GitHub user-content — Tier 4, > 25 MB assets
Swap cost
Low — the <Image> component in @chirag127/oriz-kit owns origin
resolution. Swap = change one default in the chain config. Existing
images would still resolve from their committed paths.
Why this is our pick
- Co-located with the content that embeds it; one git history covers both
- Same edge as the page that uses it (lowest latency)
- No upload flow, no API key, no rate limit
- Markdown-friendly: relative paths just work