语言
/v1/placeholder
为线框、原型和开发创建占位符图像。 指定精确尺寸、覆盖文本、选择背景和前景色,然后选择 SVG 或 PNG 输出。 当最终资源不可用时,在前端开发过程中很有用。
Image width in pixels.
Image height in pixels.
Text overlay centered on the image. Defaults to the dimensions (e.g. "600x400").
Background color as a hex code.
Text color as a hex code.
curl -X POST https://api.botoi.com/v1/placeholder \ -H "Content-Type: application/json" \ -d '{"width":600,"height":400,"text":"Hero Banner","bg_color":"#f1f5f9","text_color":"#0f172a"}'
将占位符图像放入 Figma 导出或 HTML 原型中,以便利益相关者可以在摄影或插图准备好之前检查布局和间距。
为每个图像字段使用正确大小的占位符填充暂存 CMS。 内容编辑者在上传最终资源之前会看到每张照片将占用的确切空间。
在图像上传流的集成测试中生成可预测的占位符图像。 断言尺寸和文件类型,而不依赖静态夹具文件。
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.