Image optimizations
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
| Parameter | Description | Example |
|---|---|---|
width | Resize to width in pixels | ?width=400 |
height | Resize to height in pixels | ?height=300 |
quality | Output quality 1–100 | ?quality=75 |
format | Output format | ?format=webp |
fit | Crop 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.