Blog CMS Workflows 12 min read

Placeholder Images for CMS Previews and Missing Media Fields

Use placeholder images for CMS previews, empty media fields, draft content, editorial cards, and broken remote assets without blocking publication.

CMS image placeholderMissing media placeholderCMS preview imageImage fallback CMS
Placeholder Images for CMS Previews and Missing Media Fields

CMS media fields are often optional, draft-only, deleted, migrated, or dependent on a remote asset pipeline. Placeholder images keep previews usable when media is missing.

Use generic fallback.pics URLs by content type so editors, previews, and published pages get stable image states without leaking private draft values.

Search intent

CMS placeholders protect editorial workflows

CMS previews break easily because the content model and the published frontend do not always move at the same pace. Editors may save drafts without images, remove assets, migrate media libraries, or reference remote URLs that later fail.

A CMS image placeholder gives every card, preview, and article cover a deliberate state while the real media is missing or unavailable.

Content model

Treat media as optional at render time

Even if the CMS marks an image field as required, production rendering should still handle missing data. Imports, migrations, permissions, deleted files, and API errors can all produce null or invalid media values.

Use the CMS asset URL when it exists. Use a fallback.pics URL when it does not.

Implementation tsx
function imageForEntry(entry: { imageUrl?: string | null; type: 'article' | 'docs' }) {
  if (entry.imageUrl) return entry.imageUrl;

  if (entry.type === 'docs') {
    return 'https://fallback.pics/api/v1/1200x630/F4F4F5/18181B?text=Documentation';
  }

  return 'https://fallback.pics/api/v1/1200x630/18181B/FFFFFF?text=Article+Image';
}

Previews

Keep preview cards the same size as published cards

CMS preview UIs should use the same image ratio as the published frontend. If the preview card shows a square fallback but the live page uses a wide cover, editors cannot judge the actual layout.

Standardize dimensions for content types: article covers, author avatars, product images, collection banners, and social previews.

Implementation text
Article cover:
https://fallback.pics/api/v1/1200x630/18181B/FFFFFF?text=Article+Image

Author avatar:
https://fallback.pics/api/v1/avatar/128/7C3AED/FFFFFF?text=User

Collection banner:
https://fallback.pics/api/v1/banner/1200x400/F4F4F5/18181B?text=Collection

Editorial UX

Use labels editors can understand

A good CMS placeholder describes the missing surface without pretending the final asset exists. Article Image, Author, Product Image, Collection, Documentation, and Preview are usually enough.

Avoid long headlines in the placeholder itself. The title already appears in the card or preview metadata, and long URL text is more likely to wrap or crop badly.

Privacy

Do not expose draft values in placeholder URLs

CMS previews often contain unpublished material. Placeholder URLs can still appear in logs, screenshots, browser history, preview tooling, and social unfurl caches.

Keep placeholder text generic. Do not include private article titles, embargoed product names, customer data, internal campaign names, emails, tokens, order IDs, or regulated data in generated image URLs.

Key takeaways

What to standardize before shipping

  • CMS image fields can be missing even when the content model expects media.
  • Use placeholder dimensions that match the published frontend, not just the CMS editor view.
  • Handle null media values before render and failed image loads after render.
  • Keep placeholder labels generic and safe for logs, previews, and screenshots.
  • Standardize fallback URLs by content type so editorial workflows stay predictable.

Production fallback layer

Use fallback.pics anywhere an image URL is accepted.

Start with one deterministic URL and standardize fallback behavior across your design system.

Read the docs