GitHub user-content (raw.githubusercontent.com)
GitHub user-content (raw.githubusercontent.com)
Role
Tier 4 origin in the 4-tier image-host chain. The rare-use tier — invoked when:
- An asset is too large to commit alongside the post (> 25 MB Cloudflare Pages per-asset ceiling), OR
- An animated GIF would inflate the site repo's clone size, OR
- The PNG-must-stay-PNG case where Imgur would re-encode
Approach
Push the asset to a dedicated assets branch of any
chirag127/oriz* repository. The branch is orphan (no shared
history with main) so it doesn't bloat working clones — fetch only
on explicit need. Reference the asset via:
https://raw.githubusercontent.com/<user>/<repo>/<branch>/<path>
For example:
https://raw.githubusercontent.com/chirag127/blog-site/assets/2026/06/big-animation.gif
Free tier
- Free unlimited bandwidth via
raw.githubusercontent.comfor public repos (rate-limited per IP for abusive patterns; nowhere near family scale) - Soft 100 MB ceiling per file in Git (above that → Git LFS, which has its own free 1 GB / month bandwidth — adequate for the rare case)
- 1 GB recommended ceiling per repo; the orphan-branch pattern lets us spread across repos as needed
Card / subscription required?
NO. Free GitHub account; same account that hosts the site repos. No card on file.
How it's used
- Asset goes to
<repo>/assetsbranch viagit push --force(orphan branch is rebuild-able). - Stable raw URL committed to the post's frontmatter as
image_tier_4:. - The treats it as the deepest fallback.
- Optional: front the raw URL with jsDelivr's GitHub mirror (
https://cdn.jsdelivr.net/gh/<user>/<repo>@<branch>/<path>) for better edge cache; jsDelivr is already in our stack for npm packages.
Methods supported
Anything git push can do. Standard CI flow uses
actions/checkout@v4 with ref: assets + commit-and-push.
Alternatives
- repo-hosted Tier 1 — when ≤ 25 MB
- ImgBB Tier 2 — when the asset shouldn't bloat git history
- Imgur Tier 3 — same as ImgBB except size + re-encode quirks
Swap cost
Low — branch + path naming convention is a pure git rename. URLs remain stable as long as the branch exists.
Why this is our pick
- Free unlimited; same account as the rest of the family
- Survives every other tier's outage (different operator from Cloudflare / ImgBB / Imgur)
- Permanent, content-addressable URLs (commit SHA pin available:
raw.githubusercontent.com/<user>/<repo>/<sha>/<path>) - No upload API; just
git push— fits the markdown-in-repo authoring ergonomics
Caveats
- Default
Content-Typefrom raw.githubusercontent.com istext/plainfor unrecognized extensions — stick to standard image extensions (.png,.jpg,.gif,.webp,.avif). - Browsers can hot-link, but
Cache-Controlis short — front with jsDelivr for CDN-caching when latency matters. - Don't put the family's binary firmware / installers here; those go to GitHub Releases per the object-storage-split.
Cross-refs
- 4-tier image-host decision
- repo-hosted Tier 1
- ImgBB Tier 2
- Imgur Tier 3
- jsDelivr (npm + GitHub mirror CDN)
- Object-storage split — different domain (versioned binaries vs. images)
- No card-on-file rule
- Never-hit-quotas rule