What is a Fallback Image?

A fallback image is a substitute shown when preferred visual content cannot be loaded or rendered. It may replace a missing image, failed video preview, unsupported format, or unavailable remote resource.

How Fallback Images work

A fallback is part of an interface's failure and compatibility design rather than merely another source URL. Selection may happen declaratively when the browser evaluates candidate formats, or imperatively after a chosen request or decode fails. The substitute should retain the intended semantic role and geometry even when it cannot reproduce the missing visual. It belongs in the rendering layer, while monitoring and asset repair address the underlying delivery problem.

Key facts

  1. The final img element in a picture supplies a selection fallback when source rules or formats do not match. A network failure for the selected candidate does not reliably try every earlier candidate.
  2. An error handler that replaces src must avoid assigning the same failing URL repeatedly. Removing the handler or tracking attempted sources prevents an infinite sequence of error events.
  3. Explicit width and height or a stable aspect ratio reserves layout before either source loads. Alternative text should describe the image's meaning, not merely announce that loading failed.

When Fallback Images matter

Developers select fallbacks that preserve layout dimensions and communicate unavailable content clearly. Missing intrinsic dimensions can still cause layout shifts even when a substitute loads.

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free