Documentation

Fallback image infrastructure, one URL at a time.

Add deterministic, cacheable fallback images to production applications without an SDK, asset pipeline, or runtime image dependency.

Base URL https://fallback.pics/api/v1

Quickstart

Replace a missing image with a generated fallback.

HTML image tag html
<img
  src="https://fallback.pics/api/v1/800x450/18181B/FFFFFF?text=Product+Image"
  width="800"
  height="450"
  alt="Product image fallback"
/>
Basic fallback generated by fallback.pics

Basic fallback

/640x360

Generate a deterministic image from dimensions alone.

Brand-safe media generated by fallback.pics

Brand-safe media

/800x450/18181B/FFFFFF?text=Product+Image

Control background, foreground, and visible label from the URL.

Avatar initials generated by fallback.pics

Avatar initials

/avatar/160?text=AP

Use compact presets for user, team, and organization avatars.

URL anatomy

Every fallback is readable, reviewable, and cacheable.

Standard route text
https://fallback.pics/api/v1/[width]x[height]/[bgColor]/[textColor]?text=[label]
Production behavior: Deterministic URLs are designed for long-lived CDN caching. Use stable dimensions and labels in product surfaces where layout shift matters.

Parameters

Small surface area, explicit behavior.

Parameter Type Description
width number 1-5000px. Required for standard routes.
height number 1-5000px. Omitted for avatar and square presets.
bgColor path hex Optional path segment after dimensions, without the # prefix.
textColor path hex Optional foreground path segment after background color, without the # prefix.
text query Optional URL-encoded label rendered into the fallback.

Presets

Purpose-built routes for common product states.

avatar

/avatar/128?text=JD

Initials, teams, people, organizations

banner

/banner/1200x400?text=Campaign

Marketing cards, CMS hero images, social previews

skeleton

/animated/skeleton/640x360

Loading states that preserve layout dimensions

blur

/blur/640x360

Soft media placeholders before real images load

Frameworks

Use it anywhere an image URL is accepted.

React component tsx
export function ProductFallback() {
  const src = "https://fallback.pics/api/v1/800x450/18181B/FFFFFF?text=Product+Image";

  return <img src={src} width={800} height={450} alt="Product image fallback" />;
}
Next.js Image tsx
import Image from "next/image";

export function ProductFallback() {
  return (
    <Image
      src="https://fallback.pics/api/v1/800x450/18181B/FFFFFF?text=Product+Image"
      width={800}
      height={450}
      alt="Product image fallback"
      unoptimized
    />
  );
}

Production notes

Operational guidance for production teams.

Caching

Prefer deterministic URLs and immutable cache headers for repeated UI states, product grids, emails, and preview surfaces.

Privacy

Text parameters appear in URLs and logs. Do not place secrets, tokens, or regulated customer data in fallback image URLs.

Enterprise

Custom domains, support windows, and SLA commitments can be handled through an enterprise deployment agreement.

Ready to standardize image fallbacks?

Start with one URL, then expand into presets, custom domains, and team-wide conventions.

View API Reference