Static Assets & CDN Caching

Static Assets & CDN Caching

Learn how Filebase's built-in CDN optimizes static asset delivery and improves global performance for your IPFS content.

AuthorFilebase Team
CategoryOptimization

Delivering static assets efficiently is crucial for modern web applications. When working with decentralized storage like IPFS, performance can sometimes be a concern due to the distributed nature of the network.

Filebase addresses this challenge by baking a global Content Delivery Network (CDN) directly into our Dedicated Gateways. Unlike traditional setups where you might need to configure a separate CDN service (like Cloudflare or Fastly) in front of your storage, Filebase provides this infrastructure out of the box with every dedicated gateway.

The "Baked-In" Advantage

Most IPFS providers offer a gateway, but few offer a fully integrated CDN at the edge. With Filebase, the CDN is not an add-on; it is the gateway.

  • Zero Configuration: You don't need to set up DNS records for a third-party CDN or configure caching rules. It just works.
  • Global Edge Network: Our gateways are deployed across multiple continents (North America, Europe, Asia), ensuring content is served from the location nearest to your user.
  • Smart Caching: Content is cached at the edge, significantly reducing Time to First Byte (TTFB) for subsequent requests.

Performance Impact

By leveraging our global infrastructure, Filebase Dedicated Gateways can deliver content with significantly lower latency compared to public IPFS gateways.

Our internal benchmarks have shown:

  • Up to 10x Faster TTFB: Compared to standard public gateways.
  • Consistent Global Performance: Users in Asia or Europe experience similar speeds to those in North America thanks to our distributed PoPs.
  • High Throughput: Optimized for serving large files and media assets.

Image Optimization

One of the most powerful features of our Dedicated Gateways is built-in Image Optimization. You can transform and optimize images on the fly simply by adding query parameters to your gateway URLs.

This allows you to serve perfectly sized and formatted images to your users without needing to store multiple versions of the same file.

Resizing Images

Resize images to fit your layout by specifying width and height. This reduces the payload size and improves load times.

Resize Example
https://my-gateway.myfilebase.com/ipfs/QmYourImageHash?img-width=300&img-height=200

Format Conversion

Convert images to modern, efficient formats like WebP automatically.

Format Conversion Example
https://my-gateway.myfilebase.com/ipfs/QmYourImageHash?img-format=webp

Quality & Compression

Adjust the quality of your images to balance visual fidelity with file size.

Compression Example
https://my-gateway.myfilebase.com/ipfs/QmYourImageHash?img-quality=80

Combining Transformations

You can combine multiple parameters to perform complex transformations in a single request.

Combined Example
https://my-gateway.myfilebase.com/ipfs/QmYourImageHash?img-width=500&img-format=webp&img-quality=90

Getting Started

To start using these features, you simply need a Dedicated Gateway on Filebase.

  1. Navigate to the Gateways section in your Filebase Dashboard.
  2. Create a new Gateway (Public, Private, or Scoped).
  3. Use your new Gateway URL to access your stored files.

The CDN and Image Optimization features are automatically enabled for all dedicated gateways.