Skip to main content

Image optimizations

Legacy: This page documents Filebase's IPFS tier. For new deployments, use the S3-compatible object storage tier with the s3.filebase.io endpoint.

Dedicated IPFS gateways can apply on-the-fly image transformations to JPEG, PNG, WebP, and AVIF responses — resize, compress, and convert formats by passing query parameters in the URL.

Supported transforms

ParameterDescriptionExample
widthResize to width in pixels?width=400
heightResize to height in pixels?height=300
qualityOutput quality 1–100?quality=75
formatOutput format?format=webp
fitCrop strategy: cover, contain, inside, outside?fit=cover&width=400&height=400

Examples

# Original
https://my-gateway.myfilebase.com/ipfs/{CID}

# 400px wide
https://my-gateway.myfilebase.com/ipfs/{CID}?width=400

# 75% quality WebP
https://my-gateway.myfilebase.com/ipfs/{CID}?format=webp&quality=75

# 400x400 cover crop
https://my-gateway.myfilebase.com/ipfs/{CID}?width=400&height=400&fit=cover

Caching

Transformed responses are cached at the gateway. Subsequent requests for the same parameters serve from cache without re-running the transform.

What's next