Placeimg
Placeimg is a free service that provides placeholder images for web development and design. It's super easy to use and perfect for AI agents to provide placeholders for content in web applications. Specify custom colors using hex format (e.g., ff5733 for orange). Once you've replaced the image with the actual path, you're good to go.
View on GitHub →How to Use
| Type | Example URL |
|---|---|
| Square | /640/640 |
| Landscape | /800/600 |
| Portrait | /600/800 |
| HD | /1920/1080 |
| Thumbnail | /150/150 |
| Custom Color (Dark) | /640/480?color=333333 |
| Custom Color (Blue) | /800/600?color=4a90e2 |
| Custom Color (Green) | /500/500?color=7ed321 |
| Custom Color (Red) | /640/480?color=e74c3c |
| Custom Color (Purple) | /800/600?color=9b59b6 |
| Custom Text | /640/480?text=Hello |
| Text + Color | /800/600?text=Placeholder&color=4a90e2 |
| Transparent | /640/480?transparent=true |
| Text Color | /640/480?textColor=ff0000 |
| CSS Color Name | /640/480?color=orange |
| Multi-line Text | /640/480?text=Hello\nWorld |
| Custom Font | /640/480?font=Roboto |
| Square Format | /400 |
| Color/Text Format | /blue/white |
Features
- Dynamic Generation: Images are generated on-demand with no storage needed
- Custom Dimensions: Support for any size from 1x1 to 4000x4000 pixels
- Custom Colors: Specify any hex color for the background
- Custom Text: Display custom text instead of dimensions
- Transparent Background: Support for transparent backgrounds
- Custom Text Color: Specify custom text color in hex format
- Custom Fonts: Choose from system fonts (Arial, Roboto, etc.)
- Retina Support: @2x and @3x scaling for high-DPI displays
- Format Extensions: Support for .png, .jpg, .gif, .webp, .avif (currently returns SVG)
- SVG Format: Crisp, scalable images that look great at any size
- Auto Contrast: Text color automatically adjusts for readability
- CDN Caching: 1-year cache for fast delivery worldwide
- No Dependencies: Simple URL-based API, no authentication required
Live Demos
200x200
300x200 Blue
200x300 Red
Custom Text
Text + Green
Transparent
Red Text
Blue + White Text
API Documentation
Endpoint
GET /{width}/{height}?color={hex}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| width | integer | Yes | Image width in pixels (1-4000) |
| height | integer | Yes | Image height in pixels (1-4000) |
| color | string | No | Background color in hex format (default: cccccc) |
| text | string | No | Custom text to display (default: dimensions) |
| transparent | boolean | No | Transparent background (default: false) |
| textColor | string | No | Text color in hex format or CSS name (default: auto-contrast) |
| font | string | No | Font family (default: Arial) |
Response
Returns an SVG image with Content-Type: image/svg+xml
Example
GET /800/600?color=ff5733&text=Custom
Returns an 800x600 SVG with orange background (#ff5733) and "Custom" text
AI Prompt
When using Placeimg with AI agents, you can use this prompt:
Placeimg is a free placeholder image service. Use it to generate placeholder images for web development and design.
URL format: https://placeimg.pages.dev/{width}/{height}?color={hex}&text={text}&transparent={true}
- width: Image width in pixels (1-4000)
- height: Image height in pixels (1-4000)
- color: Optional hex color for background (default: cccccc)
- text: Optional custom text to display (default: dimensions)
- transparent: Optional transparent background (default: false)
Examples:
- https://placeimg.pages.dev/640/640 - 640x640 square image
- https://placeimg.pages.dev/800/600 - 800x600 landscape image
- https://placeimg.pages.dev/640/480?color=ff5733 - 640x480 image with orange background
- https://placeimg.pages.dev/800/600?text=Hello - 800x600 image with "Hello" text
- https://placeimg.pages.dev/640/480?color=4a90e2&text=Placeholder - Custom color and text
- https://placeimg.pages.dev/640/480?transparent=true - Transparent background
The service returns SVG images with dimensions displayed as text. Once you have the final image path, replace the Placeimg URL with the actual image.