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
| Parameter | Description |
|---|---|
key | Your API key (required) |
placeholder | WIDTHxHEIGHT (max 4000x4000) or a single size for a square |
text | Label (default: the size) |
bg / color | Hex colours (default e2e4e9 / 6b7280) |
Code examples
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image" -o result
<img src="https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image" alt="Placeholder image">
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
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&placeholder=600x400&text=Hero%20image");
file_put_contents("result", $response);
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.