R2 Media - Audio, Images & Slides
Demonstrating R2 CDN media delivery for alteranai: podcast audio (MP3, M4A), infographics (PNG), and slides (PDF)
13 Nov 2026 · 1 min readR2 Media - Audio, Images & Slides
This post demonstrates the R2 CDN integration for alteranai.com, delivering various media types directly from the cloudflare R2 bucket.
Audio (MP3)
Audio (M4A)
Infographic (PNG)

Slides (PDF)
Technical Implementation
All media files are served from the R2 bucket via custom domains:
- Audio (
.mp3and.m4a): Native<audio>elements with playback controls - Infographics (
.png): Responsive images with lazy loading via<img>tags - Slides (
.pdf): Embedded PDF viewers using<iframe>with full-width layout
The CDN is configured with proper CORS headers allowing fetch access for PDF.js and other clients.
Twelve modules we wrote by hand instead of installing a framework: rank fusion in 84 lines, a tool-call salvager in 197. What each replaced, and when a library is still the right call.
Narrated product demos, generated fully locally: speech synthesis, a scripted browser, ffmpeg. The first video had 12 seconds of voice over 8 seconds of picture. The one that passed every gate was 77 seconds of a frozen frame.
Gemma-4 26B swapped 27,848 times in a real agentic run. One flag reported zero, on an easy test. Under the load we actually run, it took two settings together: experts on the CPU and an 8-bit KV cache. No new runtime needed.