//Media CDN (Images & Video)

Media Edge Delivery: Images, Video, & OG

Because our mission is "Everything for the SaaS except the SaaS", ButtrBase goes beyond standard data storage to provide a complete media edge-delivery network. This allows you to build hyper-optimized marketing sites and applications without needing third-party services like Cloudinary or Mux.

1. Global Image CDN

When an asset is uploaded, ButtrBase securely stores the original file in a private bucket and exposes a high-performance, globally distributed CDN endpoint.

Dynamic Image Optimization

You can dynamically request optimized versions of any uploaded image by appending query parameters to the asset's CDN URL.

Base URL Format:
https://cdn.buttrbase.com/assets/:asset_uuid

Device & Network-Aware Auto-Negotiation

You don't need to manually write complex <picture> tags or guess which image format a user's browser supports. The ButtrBase Edge CDN is completely Device and Network Aware.

When you request an image (or when our SDKs/WordPress plugin rewrite your URLs), the CDN analyzes the incoming HTTP headers: 1. Accept Header: If the browser supports AVIF (e.g., Chrome), we serve AVIF. If it only supports WebP (e.g., older Safari), we serve WebP. If it supports neither, we serve a highly optimized JPEG/PNG. 2. Save-Data Header: If the user is on a cellular network with "Data Saver" mode enabled, the CDN automatically increases compression (lowers the q value) to ensure the page loads instantly without eating their bandwidth. 3. Sec-CH-UA-Mobile: We detect if the request is coming from a mobile device and can automatically serve appropriately downscaled resolutions if you omit a hardcoded w (width) parameter.

You just write:

Hero
...and we handle the complex edge logic automatically.

Supported Parameters:

* w or width: Resizes the image to a specific width (px) while maintaining aspect ratio. (e.g., ?w=128) * h or height: Resizes the image to a specific height (px) while maintaining aspect ratio. (e.g., ?h=128) * fmt or format: Converts the image to a specific format (webp, avif, png, jpeg). Defaults to auto-negotiation based on the Accept header. (e.g., ?fmt=webp) * q or quality: Compression quality (1-100). Defaults to 80. (e.g., ?q=75)

Example Usage (HTML/React/SolidJS):



  
  Tenant Logo

By leveraging the Image CDN, the applications you build on ButtrBase will load significantly faster, as massive user-uploaded PNGs are automatically downscaled and converted to next-gen formats at the edge before hitting your users' browsers.

2. Adaptive Video Streaming (HLS/DASH)

Serving large MP4 files for hero backgrounds or product demos destroys marketing site load times. ButtrBase automatically transcodes uploaded videos into adaptive bitrate streams.

HLS Manifest URL:
https://cdn.buttrbase.com/video/:asset_uuid/manifest.m3u8

Example Usage (React/Video.js):



  

You can also request a specific static transcoded format for simple background loops: https://cdn.buttrbase.com/video/:asset_uuid?format=webm&res=1080p

3. Dynamic OpenGraph (OG) Images

Sharing links on Twitter/LinkedIn requires beautiful preview images. Instead of manually designing them, generate them dynamically via the Edge API.

URL Format:
https://cdn.buttrbase.com/og-image

Parameters: * title: Main headline text * subtitle: Sub-headline text * theme: light or dark * logo: Organization UUID to inject their logo

Example HTML Head: