Web Development

Placeholder Images in Development: Tools, Techniques, and Best Practices

By Harto Atelier·April 1, 2026·6 min read

Every developer has been there: you're building a layout and the real images aren't ready yet. Maybe the photographer hasn't delivered, the content team is still writing, or you're creating a prototype for a client meeting tomorrow. Placeholder images solve this problem elegantly, but they're also useful beyond prototyping.

Why Use Placeholder Images?

  • Prototyping: Show clients realistic layouts without final assets
  • Development: Build layouts with proper image dimensions before content is ready
  • Testing: Verify layouts handle different image sizes and aspect ratios
  • Documentation: Illustrate component states and variations
  • Design systems: Show image areas without committing to specific content
  • Loading states: Show blur/skeleton placeholders while real images load

Types of Placeholders

1. Dimension-Based Placeholders

The simplest type: solid colors or patterns with dimensions displayed. Great for development when you just need to see how space is allocated.

<!-- Simple gray box with dimensions -->
<img src="https://placehold.co/600x400" alt="Placeholder 600x400">

<!-- Custom colors -->
<img src="https://placehold.co/600x400/713EFD/ECE0D7" alt="Custom placeholder">

<!-- With text -->
<img src="https://placehold.co/600x400?text=Hero+Image" alt="Hero">

2. Photo Placeholders

Real photographs as placeholders—useful when you need to see how actual imagery interacts with your design.

  • Unsplash API: Beautiful, curated photos by category
  • Lorem Picsum: Random high-quality photos by dimensions
  • PlaceIMG: Categorized (nature, people, tech, architecture)
<!-- Lorem Picsum - random photo -->
<img src="https://picsum.photos/600/400" alt="Random photo">

<!-- Specific photo by ID -->
<img src="https://picsum.photos/id/237/600/400" alt="Specific photo">

<!-- Blur effect -->
<img src="https://picsum.photos/600/400?blur=2" alt="Blurred photo">

3. Avatar Placeholders

For user interfaces with profile pictures:

  • UI Avatars: Generate lettered avatars from names
  • DiceBear: Stylized avatar generators (pixel art, initials, abstract)
  • Boring Avatars: Abstract geometric avatars
<!-- UI Avatars -->
<img src="https://ui-avatars.com/api/?name=John+Doe&background=713EFD&color=ECE0D7">

<!-- DiceBear -->
<img src="https://api.dicebear.com/7.x/avataaars/svg?seed=Felix">

4. BlurHash / LQIP

Low-Quality Image Placeholders show a blurred preview while the full image loads. This is a production technique, not just for development:

  • BlurHash: Encodes a placeholder in ~20-30 characters. Decodes to a blurred color representation.
  • SQIP: SVG-based low-quality image placeholders using geometric primitives
  • Dominant color: Simple solid color matching the image's average
  • CSS gradient: A gradient approximating the image's color distribution

5. Skeleton Screens

Gray/shimmer blocks that match the layout structure. More sophisticated than single image placeholders—they represent the entire content area.

.skeleton {
  background: linear-gradient(
    90deg,
    #332f2d 0%,
    #3a3533 50%,
    #332f2d 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

Self-Hosted Solutions

External placeholder services have risks: they can go down, change APIs, or be blocked by corporate firewalls. Self-hosted alternatives:

SVG Placeholders

Generate placeholders as inline SVG—no external dependencies:

function placeholder(w, h, text = `${w}×${h}`) {
  return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' 
    width='${w}' height='${h}'%3E
    %3Crect fill='%23332f2d' width='100%25' height='100%25'/%3E
    %3Ctext fill='%239e9693' x='50%25' y='50%25' text-anchor='middle' 
      dy='.3em' font-family='sans-serif' font-size='14'%3E${text}%3C/text%3E
  %3C/svg%3E`;
}

CSS-Only Placeholders

No images at all—just CSS:

.image-placeholder {
  aspect-ratio: 16/9;
  background: #332f2d;
  display: grid;
  place-items: center;
  color: #9e9693;
  font-family: monospace;
}

.image-placeholder::after {
  content: attr(data-dimensions);
}

Best Practices

For Development

  • Match dimensions: Use placeholder sizes that match your design specs
  • Test edge cases: Very wide, very tall, very small, portrait vs landscape
  • Use realistic aspect ratios: 16:9, 4:3, 1:1, 3:2—not arbitrary dimensions
  • Include alt text: Even for placeholders, practice good accessibility habits
  • Self-host for reliability: External services can go down during demos

For Production Loading States

  • Match aspect ratio: Prevents layout shift (CLS) when real image loads
  • Use BlurHash for photos: Generates tiny color approximation
  • Skeleton for UI: Gray blocks matching content structure
  • Progressive loading: Low-quality → medium → high quality
  • Native lazy loading: loading="lazy" on images below the fold

Framework Integration

Next.js Image Component

Next.js <Image /> has built-in placeholder support:

import Image from 'next/image'

// Blur placeholder (requires static import or blurDataURL)
<Image
  src="/photo.jpg"
  placeholder="blur"
  blurDataURL="data:image/png;base64,..."
  alt="Photo"
  width={600}
  height={400}
/>

// Empty placeholder (shows blank space, no layout shift)
<Image
  src="/photo.jpg"
  placeholder="empty"
  alt="Photo"
  width={600}
  height={400}
/>

Performance Impact

Placeholder strategy affects Core Web Vitals:

  • CLS (Cumulative Layout Shift): Placeholders with correct dimensions prevent layout shift. This is the single biggest benefit.
  • LCP (Largest Contentful Paint): Quick placeholders + lazy-loaded real images improve perceived performance.
  • FID/INP: Inline SVG/CSS placeholders don't block the main thread.

Generate Placeholder Images

Need placeholder images for your next project? Our Placeholder Image Generator creates custom placeholder images with your dimensions, colors, text, and patterns. Download as PNG, SVG, or get data URIs and CSS code. Perfect for prototyping, testing, and development workflows.

The right placeholder strategy makes development smoother, prototypes more convincing, and production sites faster. Small detail, big impact.