DDiwigo API

Placeholder Image API

SVG placeholder image of any size, for mock-ups and layouts.

What is it?

The Diwigo placeholder API returns an SVG image of any size with a label and colours of your choice, for mock-ups and page layouts.

It answers with SVG image and is included in the free plan: 10,000 requests per API key and per month.

Example request

GET https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image

Parameters

ParameterDescription
keyYour API key (required)
placeholderWIDTHxHEIGHT (max 4000x4000) or a single size for a square
textLabel (default: the size)
bg / colorHex colours (default e2e4e9 / 6b7280)

Code examples

cURL
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image" -o result
HTML
<img src="https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image" alt="Placeholder image">
JavaScript
const img = new Image();
img.src = "https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image";
img.alt = "Placeholder image";
document.body.append(img);
PHP
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image");
file_put_contents("result", $response);
Python
import requests

response = requests.get("https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image")
open("result", "wb").write(response.content)

Use cases

  • Fill layouts before the real pictures are ready
  • Show image sizes in design mock-ups
  • Default images for empty content

Placeholder image: questions and answers

What does the Placeholder image API do?

The Diwigo placeholder API returns an SVG image of any size with a label and colours of your choice, for mock-ups and page layouts.

How do I call the Placeholder image API?

Send a GET request to https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image with your own API key instead of YOUR_API_KEY. It answers with SVG image.

Is the Placeholder image API free?

Yes, it is included in the free plan: 10,000 requests per API key and per calendar month, shared by all Diwigo endpoints. Higher limits are available on request.