Fallback Parameter
Control fallback behavior with ?fallback= and handle missing variants or formats.
Fallback
Use fallback to control what happens when the requested variant or format doesn’t exist.
Quick take: fallback=true returns the default logo if a specific variant or format is missing. fallback=false returns a 404.
query
fallbackboolean
Controls whether BrandQL falls back to the default logo when a requested variant or format is missing.
With fallback=false, missing variants or formats return a 404.
curl "https://api.brandql.com/logo/stripe.com?variant=dark&fallback=true"
curl "https://api.brandql.com/logo/stripe.com?variant=dark&fallback=false"
curl "https://api.brandql.com/logo/stripe.com?format=svg&fallback=false"
curl "https://api.brandql.com/logo/stripe.com?size=128&fallback=false"
Strict mode
If you only want a result when the requested asset exists, set fallback=false. If the requested variant or format isn’t available, the response is a 404.
Common use cases
- Dark/light mode toggles: detect availability and only render if it exists
- SVG‑only assets: avoid silently receiving a PNG
- Design QA: confirm which variants are actually present
Combine with format
See Format Parameter.
Combine with variant
See Variant Parameter.
Combine with size
See Size Parameter.
Notes
fallbackonly affects availability checks, not resizing or image transformations.- If you omit
fallback, we treat it astrue.
Related
Was this page helpful?