How to Use Placeholder Images in Web Design and Mockups

When to use dummy images, which sizes and formats to pick, SVG vs PNG placeholders, data URIs in code, and how to stop placeholders from reaching production.

Updated September 29, 2026 6 min read

Use the free Placeholder Image GeneratorCreate dummy images of any size and colour as PNG, JPG, WebP or SVG files

Every web page, app screen and marketing template has boxes that will eventually hold a photo, a product shot or an advert. Early in a project those images do not exist yet. The copywriter is still writing, the photographer is booked for next month, and the ad partner has not sent their creative. Leaving those areas empty hides layout problems; dropping in random stock photos distracts reviewers who start commenting on the photo instead of the layout.

Placeholder images solve this. This guide explains what makes a good placeholder, which sizes to use, how the formats differ, how to embed a placeholder directly in code, and how to make sure none of them slip into the finished product.

What a good placeholder does

A placeholder is a stand-in with the exact dimensions of the final image. It should:

  • Reserve the correct space so the layout, text wrapping and breakpoints behave as they will in production.
  • Label itself. Showing "1200 × 630" or "Hero image" on the image tells designers, developers and clients what goes there.
  • Look deliberately unfinished. Neutral greys make it obvious that the content is missing, so nobody signs off on a page that still has gaps.
  • Load instantly and work offline, so it never slows down a prototype.

Aspect ratio matters more than pixel size

Responsive sites scale images, so the displayed size changes with the screen. What stays constant is the aspect ratio: 1200 × 630 and 600 × 315 are the same shape. When you create placeholders, match the ratio of the real asset. An Aspect Ratio Calculator helps when you know one dimension and the ratio.

Common sizes

The tool includes presets for sizes that come up constantly:

Preset Size (px) Typical use
Thumbnail 150 × 150 Product grids, small cards
Avatar 400 × 400 Profile pictures
Banner 728 × 90 Leaderboard ad slot
Medium rectangle 300 × 250 Sidebar ad slot
Blog header 1200 × 630 Article headers, link previews
HD 1280 × 720 Video thumbnails, slides
Full HD 1920 × 1080 Full-width hero sections
Instagram 1080 × 1080 Square social posts
Story 1080 × 1920 Vertical stories and reels

Platform requirements change over time, so check the current official guidance for any social network or ad platform before producing final artwork.

Create a placeholder with our tool

The Placeholder Image Generator draws the image in your browser; nothing is uploaded.

  1. Open the Placeholder Image Generator.
  2. Choose a Size preset, or type a Width (px) and Height (px) yourself, up to 5,000 pixels on each side.
  3. Set the Background and Text colour. Soft grey with darker grey text is the classic look.
  4. Leave Text empty to show the dimensions, or type a label such as "Team photo" (up to 80 characters). The font size adapts to fit.
  5. Pick a Format: PNG, JPG, WebP or SVG.
  6. Click Download to save the file, named like placeholder-1200x630.png.
  7. For code, click Copy data URI. With SVG selected you can also use Copy SVG code to paste the markup directly into HTML.

The preview on the right shows the result at the chosen size, scaled down if it is larger than the screen.

Choosing a format

  • SVG is text-based and tiny, often well under a kilobyte, no matter how large the dimensions. It is ideal for mockups and code. Text is rendered with a common system font (Arial, Helvetica or a sans-serif fallback), so it can look slightly different on different machines.
  • PNG is pixel-perfect and universally accepted. Use it where a tool or CMS insists on a raster image, or where you need the exact pixel count in the file.
  • JPG gives smaller files for large dimensions, useful when testing upload limits. Flat colour and text are not what JPG is designed for, so edges may be very slightly soft.
  • WebP tests whether your pipeline handles modern formats; it is typically smaller than PNG for the same image.

Using data URIs in code

A data URI puts the image inside your HTML or CSS as text, so there is no separate file:

<img src="data:image/svg+xml;charset=utf-8,%3Csvg..." width="1200" height="630" alt="Placeholder">

This is handy in component libraries, email template tests and quick prototypes. Two cautions: raster data URIs become huge for large images (the tool warns you when one passes about two megabytes), and inline images cannot be cached separately by the browser. SVG is almost always the better choice for inline placeholders. If you need to inline a real photo later, Image to Base64 converts existing files.

Other ways to get placeholders

Placeholder services. Online services generate images from a URL that encodes the size. They are convenient, but your prototype then depends on a third-party server being online, and requests reveal your page to that service. A downloaded file or inline SVG has neither issue.

Design tools. Figma, Sketch and similar apps have image placeholders built in. They are ideal inside the design file; the generator is for when you need an actual image file or code.

CSS only. A div with a fixed aspect ratio and a background colour can stand in for an image. That works well for layout, but it doesn't test how your img elements, lazy loading or CMS image fields behave.

Placeholder text. Pair image placeholders with dummy copy from a Lorem Ipsum Generator so reviewers focus purely on layout.

Tips and pitfalls

Always set width and height in HTML

Even with a placeholder, add width and height attributes to img tags. Browsers use them to reserve space before the image loads, which prevents layout shift.

Label placeholders with their purpose

"Hero, 1920 × 1080, dark background" tells a photographer much more than dimensions alone. The text field is there for that.

Search before launch

Before a site goes live, search the codebase and CMS for placeholder-, data:image/svg+xml and your label text. It is a cheap check that catches forgotten boxes.

Huge sizes are slow to render

Rendering a 5,000 × 5,000 PNG takes a moment and produces a large file. If you only need to test layout, SVG at the same dimensions is instant.

Frequently asked questions

What is the best format for a placeholder image?

SVG for mockups and code because it is tiny and sharp at any size; PNG when a system requires a regular image file.

What is the maximum size?

Up to 5,000 pixels wide and 5,000 pixels high.

Can I put my own text on the placeholder?

Yes. Type up to 80 characters in the Text field. Leave it empty to show the dimensions instead.

Are the images uploaded to a server?

No. They are drawn in your browser and downloaded directly to your device.

Why does the SVG text look different on another computer?

SVG text uses fonts installed on the viewing device. If exact appearance matters, download a PNG instead.

Try it now: Placeholder Image Generator

Loading tool…