Skip to content

Serve images from Cloudflare R2 CDN#352

Merged
ptrlrd merged 5 commits into
stagingfrom
feat/cdn-images
May 26, 2026
Merged

Serve images from Cloudflare R2 CDN#352
ptrlrd merged 5 commits into
stagingfrom
feat/cdn-images

Conversation

@ptrlrd
Copy link
Copy Markdown
Owner

@ptrlrd ptrlrd commented May 26, 2026

Summary

  • Add CDN_BASE_URL env var to backend resolve_image_url for absolute CDN URLs
  • Add NEXT_PUBLIC_CDN_URL env var and imageUrl() helper on the frontend
  • Migrate all 47 frontend components from hardcoded ${API}/static/images/... to imageUrl()
  • Falls back to existing API-relative paths when env vars are unset (local dev)

ptrlrd added 5 commits May 25, 2026 20:52
Backend: resolve_image_url returns absolute CDN URLs when CDN_BASE_URL
is set. Frontend: new imageUrl() helper replaces hardcoded API+static
image paths across all components. Falls back to API-relative paths
when env vars are unset (local dev).
Reusable component used in both the submit-a-run page and the
profile page upload section.
Match the profile page's drag-and-drop style. Show Steam/Discord
sign-in buttons when not authenticated so runs get associated.
Display recent runs when signed in with a link to full profile.
Remove paste-JSON section (available in profile).
@ptrlrd ptrlrd merged commit d71de1c into staging May 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant