API Reference
Images
Images API
Generate custom placeholder images dynamically.
Endpoint
GET /api/img
Parameters
| Parameter | Default | Description |
|---|---|---|
| w | 600 | Width of the image in pixels (16 to 2000). |
| h | 400 | Height of the image in pixels (16 to 2000). |
| bg | #f3f4f6 | Background color (Hex code). |
| fg | #9ca3af | Foreground (text) color (Hex code). |
Examples
<img src="https://placehold.harshsandhu.com/api/img?w=800&h=400&bg=000&fg=fff" alt="Placeholder" />On this page