About this tool
Makes a simple picture of the size you choose, with a colour, optional text (the size by default) and an optional pattern. It is useful when the real picture is not ready yet. This tool needs no file.
For example, you fill a web page layout with grey boxes marked 800 x 600 while designing.
How to use it
- Choose this tool.
- Type the width and height you need.
- Choose the colour, and type some text or a pattern if you like.
- Press Generate.
- Download your picture.
What you get back
You get a new picture of the size you asked for (PNG, JPEG, WebP, AVIF or SVG) that you can download.
GOOD TO KNOW
Takes no file. Counts as one image.
TEST IT LIVE
Try Placeholder in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/placeholder
Tool ID
images.placeholder
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Image
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/images/placeholder" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'width=800' \
-F 'height=600' \
-F 'text=Hero image'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.placeholder({
"width": 800,
"height": 600,
"text": "Hero image"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->placeholder([
'width' => 800,
'height' => 600,
'text' => 'Hero image',
]);
echo $result->requestId;More in Images
