Placeholder image
image_placeholderGenerate custom placeholder images with centered text, size presets, and PNG/JPEG/WebP/SVG output for web design, mockups, and ad layouts.
Instructions
Make a placeholder image of any size (up to 8000 px a side): solid background with centred text (default "W × H", "\n" for line breaks), auto-fitted font size or a fixed one, PNG / JPEG / WebP / SVG. Size presets for web, social media, IAB ads and devices. Optionally returns a data URI / tag for inlining. Text uses Inter when installed, else a system sans-serif. Web version: https://s3eidat.github.io/placeholder-image/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to show. Empty = "W × H". Use "\n" (backslash n) or a real newline for a line break. | |
| color | No | Text colour (#rgb or #rrggbb). Default #9ca3af. | #9ca3af |
| width | No | Width in pixels. Default 1200. | |
| format | No | Output format. Default png. | png |
| height | No | Height in pixels. Default 630. | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| preset | No | Size preset (overrides width/height): open-graph-link-preview 1200×630, hero-16-9-full-hd 1920×1080, hd-16-9 1280×720, blog-image-4-3 800×600, thumbnail-3-2 600×400, avatar 256×256, instagram-square 1080×1080, instagram-portrait-4-5 1080×1350, story-reel-9-16 1080×1920, x-twitter-header 1500×500, linkedin-banner 1584×396, youtube-thumbnail 1280×720, medium-rectangle 300×250, leaderboard 728×90, wide-skyscraper 160×600, mobile-banner 320×50, half-page 300×600, billboard 970×250, iphone-15-screen 1179×2556, desktop-1440 1440×900, 4k-uhd 3840×2160. | |
| dataUri | No | Also return the image as a data URI and an <img> tag (for small images). | |
| fontSize | No | Font size in px; 0 = auto-fit (default). | |
| background | No | Background colour (#rgb or #rrggbb). Default #1f2937. | #1f2937 |
| fontWeight | No | Font weight. Default 600. | 600 |
| returnBase64 | No | Also return the output as base64 in the result (only for small files). Default false. |