Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 8 min read Announcement mediumAdept

Supabase Storage v2: Image resizing and Smart CDN

Supabase Storage adds on-demand image resizing via imgproxy, storage webhooks, rate-limiting and a Smart CDN that invalidates cached objects globally within about 60 seconds of an update or delete. Resizing is requested from the client through URL parameters, never upscales beyond the original, and uses resize modes that mirror CSS object-fit. The CDN builds cache keys from ETag, tenant ID, bucket and object name, stored in a global KV store. A cache manager consumes storage webhook events to refresh ETags, which avoids CDN purge limits and raised cache hit rates. The resizer and Storage API run as separate containers so they scale independently, and pricing is per transformed image rather than per transformation.

Related posts

  • Supabase Storage v3: Resumable Uploads with support for 50GB files

    Supabase mediumAdept

    Supabase Storage v3 adds resumable uploads via the open TUS protocol, raising the max file size to 50GB on Pro plans. To scale tus-node-server across load-balanced instances without sticky sessions, Storage uses Postgres transactional advisory locks keyed on a hash of the object path, so only one server writes a given object's chunks to S3 at a time. The release also adds image quality and format transforms with WebP by default, a Next.js image loader, presigned upload URLs, and per-bucket size and MIME-type limits.

  • Scaling a SaaS application on Railway

    Railway mediumAdept

    A Remix and PostgreSQL job board on Railway is scaled up with a staging environment tied to a `stage` branch, automatic vertical scaling, and horizontal replicas. Replicas cannot be added while the service uses a persistent volume, so file uploads move to a self-hosted, S3-compatible MinIO bucket and resume downloads are served through pre-signed URLs. Costs are cut by caching job detail pages for an hour at Cloudflare using a Remix `Cache-Control` header plus a Cloudflare cache rule, sleeping the staging app when idle, and using private networking to avoid egress fees.

  • Rearchitecting Hugging Face Uploads and Downloads

    Hugging Face mediumAdept

    Hugging Face's Xet team is replacing the Hub's direct-to-S3 uploads and CloudFront downloads with a content-addressed store (CAS) built on "dumb reads, smart writes": reads fetch reconstruction info from CAS, and writes are chunked, deduplicated and validated before reaching S3. Byte-level handling gets around CloudFront's 50GB file limit, enables format-aware dedup and compression for Parquet and Safetensors, and adds audit telemetry. Analysis of 8.2M upload requests (130.8 TB from 88 countries) in one day showed the top 7 countries produce 80% of bytes, so CAS nodes will run in three AWS regions: us-east-1 and eu-west-3 with 4 nodes each, and ap-southeast-1 with 2. Hugging Face accepts an estimated 12% drop in aggregate first-hop bandwidth, expecting other optimizations to offset it.

  • Build a Simple Image Resizing API in less than 100 LOC

    Deno mediumAdept

    An HTTP image resizing API built on Deno uses imagemagick_deno, ImageMagick compiled to WebAssembly, and fits in under 100 lines of TypeScript. The server validates query parameters (image URL, width and height capped at 2048, and a resize or crop mode), fetches the remote image and checks its Content-Type. It then resizes or crops it with MagickGeometry, ignoring aspect ratio only when both dimensions are given. The finished single-file app deploys to Deno Deploy via GitHub integration.

  • Supabase Storage now in Beta

    Supabase mediumAdept

    Supabase Storage moves to Beta with range-request streaming for audio/video, whole-bucket public visibility (private by default, to avoid S3-style per-object exposure), directory uploads via the File and Directory Entries API, an RLS policy editor with SQL templates, and a local-filesystem backend so self-hosted setups need no S3. To keep supabase-js small and universal without a FormData polyfill or separate Node/browser bundles, the server now accepts raw binary bodies, letting clients upload Buffers, Blobs and Node streams. The dashboard emulates filesystem semantics on S3: move becomes copy-then-delete, and placeholder files keep empty directories from disappearing. Upsert support and list virtualization for large buckets are also added.

The quest for software engineering knowledge.

Look:
Layout: