ximg.es

SVG placeholders and LQIP

An SVG placeholder that lives inside the HTML itself, and a blurred version of a photo so the space doesn’t look empty while it downloads.

Leave empty for the dimensions.
600×400

The same placeholder as a file: https://ximg.es/600x400/cccccc/555555

Blurred preview (LQIP) of an image

Upload a photo and get three ways to fill its space while it loads: a blurred thumbnail, the same thumbnail inside a blurred SVG, or just its average colour.

20 px

SVG placeholder or URL placeholder

The ximg.es generator serves placeholders as files: https://ximg.es/600x400. That’s the most convenient option while building a layout, but each image is a request. An inline SVG lives inside the HTML or CSS itself: it makes no request, weighs around 300 bytes, scales without losing sharpness and works offline. It’s ideal for prototypes sent by email, design-system components or automated tests.

The data URI is URL-encoded, not Base64: with SVG it’s smaller and stays readable.

What an LQIP is

Low Quality Image Placeholder: a tiny version of the image shown while the real one loads. The space no longer looks blank, the user gets a sense of the content and the page feels faster. The three variants:

How to use it

Set the LQIP as the background of the <img> (or its container) and keep width and height so the space already has its size. When the image arrives, it covers the background. No JavaScript needed.

Frequently asked questions

What is an SVG placeholder?

A filler image written in SVG inside the code itself. It shows a rectangle of whatever size you want without downloading any file.

Why URL-encoded rather than Base64?

Because SVG is text: escaping just a few characters makes it smaller than Base64, and it compresses better with gzip.

How big should an LQIP be?

Between 10 and 40 px wide. Larger and it’s too heavy to inline in the HTML; smaller and you can barely make anything out.

Does an LQIP improve LCP?

Not directly: LCP measures when the real image is painted. It improves perceived speed and, together with width and height, prevents layout shifts (CLS).

What is the average colour?

The colour you get by averaging every pixel in the image. It’s the lightest possible placeholder and the one ximg.es stores for every photo in its bank.

Is my image uploaded to a server?

No. The thumbnail is created with canvas in your browser.

More tools

See all tools · Placeholder image generator