image-ecommerce
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseimage-ecommerce
image-ecommerce
Use this skill for all e-commerce product photography requests on Starchild.
Covers: white-background hero shots, lifestyle product scenes, flat lay arrangements, detail/macro close-ups, packaging/unboxing shots, group/collection displays, scale reference images, seasonal themes (spring/summer/autumn/winter), 360-degree views, comparison layouts, infographic-style feature callouts, and platform-optimized images for Amazon, Shopify, Taobao, Instagram, Xiaohongshu, Etsy, eBay.
Core principle: call the provided script. Do not re-implement proxy/billing plumbing.
When to use image-ecommerce vs other image skills:
- image-ecommerce → user wants PRODUCT PHOTOS for e-commerce, catalogs, or marketing
- image-edit → user wants to EDIT or TRANSFORM an existing image (not product-specific)
- image-portrait → user wants a portrait with their face/identity preserved
- image-create → user wants to CREATE something from text (not product photography)
- image-tryon → user wants to try on clothing/accessories on a person
在Starchild平台上,所有电商产品摄影需求均可使用此skill。
涵盖:白底主图、产品生活场景图、平铺俯拍布局、细节/微距特写图、包装/开箱展示图、产品组/系列展示图、尺寸参考图、季节主题图(春/夏/秋/冬)、360°全景图、对比布局图、信息图表式功能标注图,以及针对Amazon、Shopify、淘宝、Instagram、小红书、Etsy、eBay优化的平台适配图片。
**核心原则:**调用提供的脚本,请勿重新实现代理/计费相关逻辑。
何时选择image-ecommerce而非其他图片类skill:
- image-ecommerce → 用户需要用于电商、产品目录或营销活动的产品照片
- image-edit → 用户需要编辑或转换现有图片(非产品摄影专属)
- image-portrait → 用户需要保留面部/身份特征的肖像照
- image-create → 用户需要根据文本生成内容(非产品摄影)
- image-tryon → 用户需要将服饰/配饰试穿在人物身上
1. Quick start — single product photo (most common)
1. 快速入门 — 单张产品照片(最常用)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/product.jpg",
style="hero",
background="white",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/product.jpg",
style="hero",
background="white",
)result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}
result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}
The script reads the local file, base64-encodes it, and sends it to fal.ai as a data URI — no manual URL publishing needed.
该脚本会读取本地文件,将其base64编码后以数据URI形式发送至fal.ai,无需手动发布URL。2. Quick start — public URL
2. 快速入门 — 公共URL
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_url="https://example.com/product.jpg",
style="lifestyle",
background="natural",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_url="https://example.com/product.jpg",
style="lifestyle",
background="natural",
)3. Quick start — text-to-image (no product photo)
3. 快速入门 — 文本生成图片(无产品照片)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
prompt="premium wireless bluetooth headphones, matte black finish, over-ear design",
style="hero",
background="white",
)When no or is provided, the script uses the text-to-image endpoint (no suffix). A describing the product is required in this mode.
product_pathproduct_url/editpromptpython
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
prompt="premium wireless bluetooth headphones, matte black finish, over-ear design",
style="hero",
background="white",
)当未提供或时,脚本会使用文本生成图片接口(无后缀)。此模式下必须提供描述产品的。
product_pathproduct_url/editprompt4. Quick start — platform-optimized
4. 快速入门 — 平台适配优化
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/product.jpg",
platform="amazon",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/product.jpg",
platform="amazon",
)Automatically applies: style=hero, background=white, aspect_ratio=1:1
自动应用:style=hero, background=white, aspect_ratio=1:1
undefinedundefined5. Quick start — complete product image set
5. 快速入门 — 完整产品图片套装
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
product_path="uploads/product.jpg",
prompt="premium leather wallet",
platform="amazon",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
product_path="uploads/product.jpg",
prompt="premium leather wallet",
platform="amazon",
)Generates 7 images: hero, lifestyle, detail, scale, alternate angle, packaging, flat lay
生成7张图片:主图、生活场景图、细节图、尺寸参考图、多角度图、包装图、平铺俯拍图
undefinedundefinedDelivering the result to the user — IMPORTANT
向用户交付结果 — 重要提示
Never hand the user the raw fal.media URL. fal serves files with restrictive CSP headers. The only reliable delivery path is the already-downloaded local file:
- Use each image's (e.g.
local_path) — the script always downloads on success.output/images/xxx.png - Tell the user the files are saved to and viewable in the workspace file panel.
output/images/ - On Web channel, embed inline so the user can preview in chat:
markdown
 - On Telegram / WeChat: send via or
send_to_telegram(file_path="output/images/...", message_type="image").send_to_wechat(file_path="output/images/...", message_type="image")
切勿直接将原始fal.media URL交给用户。fal提供的文件带有严格的CSP头,唯一可靠的交付方式是已下载的本地文件:
- 使用每张图片的(例如
local_path)——脚本在执行成功后总会自动下载文件。output/images/xxx.png - 告知用户文件已保存至,可在工作区文件面板中查看。
output/images/ - 在Web渠道中,将图片嵌入聊天内容以便用户预览:
markdown
 - 在Telegram/微信渠道中,通过或
send_to_telegram(file_path="output/images/...", message_type="image")发送图片。send_to_wechat(file_path="output/images/...", message_type="image")
6. Parameters — product_photo()
product_photo()6. 参数说明 — product_photo()
product_photo()| Parameter | Required | Default | Description |
|---|---|---|---|
| no | — | Local workspace file path to the product image |
| no | — | Public HTTPS URL of the product image |
| no | — | Custom prompt describing the product or desired photo |
| no | | Photography style preset (see §7) |
| no | | Background type (see §8) |
| no | | Model: |
| no | | Number of images to generate (1–8) |
| no | | Output ratio: |
| no | — | Platform preset: |
Image input rules:
- Provide OR
product_pathfor edit mode (transform existing product photo).product_url - If both are given, takes priority.
product_path - Omit both for pure text-to-image generation (requires ).
prompt
Prompt priority: (enhanced) > templates.
prompt + style/backgroundstyle + backgroundPlatform preset: When is set, it overrides default , , and with platform-optimized values — unless you explicitly set them.
platformstylebackgroundaspect_ratio| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
| 否 | — | 产品图片在本地工作区的文件路径 |
| 否 | — | 产品图片的公开HTTPS URL |
| 否 | — | 描述产品或期望照片效果的自定义提示词 |
| 否 | | 摄影风格预设(见第7节) |
| 否 | | 背景类型(见第8节) |
| 否 | | 模型选项: |
| 否 | | 生成图片数量(1–8张) |
| 否 | | 输出比例: |
| 否 | — | 平台预设: |
图片输入规则:
- 若要使用编辑模式(转换现有产品照片),需提供或
product_path。product_url - 若同时提供两者,优先级更高。
product_path - 若两者都不提供,则启用纯文本生成图片模式(需提供)。
prompt
提示词优先级: (增强版) > 模板。
prompt + 风格/背景风格 + 背景平台预设: 设置后,会使用平台优化值覆盖默认的、和——除非你显式指定这些参数。
platformstylebackgroundaspect_ratio7. Photography styles
7. 摄影风格
Core product shots
核心产品照片
| Style | Key | Best for |
|---|---|---|
| Hero shot | | Primary listing image, magazine ads, main product display |
| Lifestyle | | Product in use, editorial, social media |
| Flat lay | | Instagram, top-down arrangement, catalog |
| Detail close-up | | Material quality, texture, craftsmanship |
| Packaging | | Unboxing experience, brand packaging |
| Group/collection | | Multiple products, variants, bundles |
| Scale reference | | Size comparison, product in hand |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 主图 | | 商品列表首图、杂志广告、产品主展示位 |
| 生活场景 | | 产品使用场景、社论内容、社交媒体 |
| 平铺俯拍 | | Instagram、俯视布局、产品目录 |
| 细节特写 | | 材质质感、纹理、工艺展示 |
| 包装展示 | | 开箱体验、品牌包装展示 |
| 产品组/系列 | | 多产品展示、变体产品、套装产品 |
| 尺寸参考 | | 大小对比、手持产品展示 |
Marketing & informational
营销与信息类
| Style | Key | Best for |
|---|---|---|
| 360° view | | Multi-angle showcase, turntable display |
| Comparison | | Side-by-side, before/after, feature highlight |
| Infographic | | Feature callouts, specs, dimensions |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 360°全景 | | 多角度展示、转盘式呈现 |
| 对比图 | | 并排对比、前后对比、功能亮点展示 |
| 信息图表 | | 功能标注、参数说明、尺寸展示 |
Seasonal campaigns
季节营销活动
| Style | Key | Best for |
|---|---|---|
| Spring | | Cherry blossoms, fresh green, pastel |
| Summer | | Beach, sunshine, tropical, vacation |
| Autumn | | Fall leaves, golden tones, harvest |
| Winter | | Snow, holiday, festive, cozy |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 春季 | | 樱花、清新绿色、马卡龙色调 |
| 夏季 | | 海滩、阳光、热带风情、度假场景 |
| 秋季 | | 落叶、金色色调、丰收主题 |
| 冬季 | | 雪景、节日氛围、温馨场景 |
8. Background types
8. 背景类型
| Background | Key | Best for |
|---|---|---|
| Pure white | | Amazon, e-commerce standard, marketplace listings |
| Gradient | | Hero shots, premium feel, modern |
| Studio | | Professional catalog, controlled lighting |
| Natural | | Outdoor products, organic brands |
| Lifestyle | | Home/office context, in-use scenarios |
| Colored | | Brand-matching, vibrant marketing |
| Textured | | Luxury products, marble/wood surface |
| Transparent | | Product cutout, PNG for design use |
| 背景 | 标识 | 适用场景 |
|---|---|---|
| 纯白背景 | | Amazon、电商标准、平台商品列表 |
| 渐变背景 | | 主图、高端质感、现代风格 |
| 工作室背景 | | 专业产品目录、可控光线环境 |
| 自然背景 | | 户外产品、有机品牌 |
| 生活场景背景 | | 家居/办公场景、产品使用场景 |
| 纯色背景 | | 品牌配色、活力营销内容 |
| 纹理背景 | | 高端产品、大理石/木质表面 |
| 透明背景 | | 产品抠图、设计用PNG图 |
9. Platform presets
9. 平台预设
| Platform | Aspect Ratio | Background | Style | Key Requirements |
|---|---|---|---|---|
| Amazon | 1:1 | white | hero | Pure white bg (RGB 255,255,255), product fills 85%+, no props/text/watermarks, min 1000px (1600px+ for zoom) |
| Shopify | 1:1 | white | hero | Square format, consistent catalog style, 2048x2048 recommended |
| Taobao | 1:1 | white | hero | 800x800 minimum, white bg for main image |
| 1:1 | lifestyle | lifestyle | 1080x1080 feed, lifestyle context, visually appealing | |
| Xiaohongshu | 3:4 | lifestyle | flat_lay | 1080x1440 vertical, aesthetic flat lay, text overlay space |
| Etsy | 4:3 | natural | lifestyle | Handmade/artisan feel, natural backgrounds |
| eBay | 1:1 | white | hero | White background, clear product view, 1600px min for zoom |
| 平台 | 宽高比 | 背景 | 风格 | 核心要求 |
|---|---|---|---|---|
| Amazon | 1:1 | white | hero | 纯白背景(RGB 255,255,255),产品占比85%以上,无道具/文字/水印,最小尺寸1000px(支持缩放需1600px以上) |
| Shopify | 1:1 | white | hero | 正方形格式,统一目录风格,推荐尺寸2048x2048 |
| 淘宝 | 1:1 | white | hero | 最小尺寸800x800,主图需使用白底 |
| 1:1 | lifestyle | lifestyle | 1080x1080 feed尺寸,生活场景背景,视觉吸引力强 | |
| 小红书 | 3:4 | lifestyle | flat_lay | 1080x1440竖版尺寸,美观的平铺俯拍布局,预留文字叠加空间 |
| Etsy | 4:3 | natural | lifestyle | 手工/匠人风格,自然背景 |
| eBay | 1:1 | white | hero | 白底背景,产品清晰展示,最小尺寸1600px以支持缩放 |
10. Model selection guide
10. 模型选择指南
| Model | Key | Speed | Quality | Best for |
|---|---|---|---|---|
| NanoPro | | ~25s | Good | Default for all requests. Fast iteration. |
| GPT Image 2 | | ~150s | Best | When user explicitly asks for "highest quality" or "best quality". Complex scenes. |
Decision rules:
- Default: always use unless the user explicitly requests higher quality.
nanopro - Use when: user says "highest quality", "best quality", "premium", or the scene is very complex with many specific details.
gpt - Use when: user wants fast results, is iterating on styles, or generating multiple images.
nanopro
python
undefined| 模型 | 标识 | 速度 | 画质 | 适用场景 |
|---|---|---|---|---|
| NanoPro | | ~25秒 | 良好 | 所有请求的默认选项,快速迭代 |
| GPT Image 2 | | ~150秒 | 最佳 | 用户明确要求“最高画质”或“最佳质量”时,以及复杂场景 |
决策规则:
- 默认设置: 除非用户明确要求更高画质,否则始终使用。
nanopro - 使用的场景: 用户提及“最高画质”、“最佳质量”、“高端”,或场景包含大量特定细节的复杂内容。
gpt - 使用的场景: 用户需要快速结果、迭代风格,或生成多张图片。
nanopro
python
undefinedDefault (fast)
默认(快速)
result = product_photo(product_path="product.jpg", style="hero")
result = product_photo(product_path="product.jpg", style="hero")
High quality (user requested)
高画质(用户要求)
result = product_photo(product_path="product.jpg", style="hero", model="gpt")
---result = product_photo(product_path="product.jpg", style="hero", model="gpt")
---11. Intent recognition guide
11. 意图识别指南
Use this table to map user requests to the correct style + background:
使用下表将用户请求映射到对应的风格+背景:
Product listing images
商品列表图片
| User says | Style | Background | Notes |
|---|---|---|---|
| "product photo", "listing image", "主图" | | | Default e-commerce |
| "Amazon listing", "亚马逊主图" | | | Use |
| "Shopify product", "独立站产品图" | | | Use |
| "淘宝主图", "天猫主图" | | | Use |
| "white background", "白底图" | | | Standard packshot |
| "product on white", "纯白背景" | | | Amazon-style |
| 用户表述 | 风格 | 背景 | 说明 |
|---|---|---|---|
| "产品照片"、"商品列表图片"、"主图" | | | 电商默认选项 |
| "Amazon商品列表"、"亚马逊主图" | | | 使用 |
| "Shopify产品"、"独立站产品图" | | | 使用 |
| "淘宝主图"、"天猫主图" | | | 使用 |
| "白底图"、"white background" | | | 标准产品图 |
| "纯白背景产品"、"product on white" | | | Amazon风格 |
Lifestyle & context
生活场景与环境
| User says | Style | Background | Notes |
|---|---|---|---|
| "lifestyle photo", "场景图" | | | Product in context |
| "product in use", "使用场景" | | | Show product being used |
| "flat lay", "俯拍", "平铺" | | | Top-down arrangement |
| "Instagram product", "小红书产品" | | | Social media optimized |
| 用户表述 | 风格 | 背景 | 说明 |
|---|---|---|---|
| "生活场景图"、"lifestyle photo" | | | 产品使用场景 |
| "产品使用场景"、"product in use" | | | 展示产品使用状态 |
| "俯拍"、"平铺"、"flat lay" | | | 俯视布局 |
| "Instagram产品图"、"小红书产品图" | | | 社交媒体优化 |
Detail & technical
细节与技术类
| User says | Style | Background | Notes |
|---|---|---|---|
| "close-up", "detail shot", "细节图" | | | Macro/texture |
| "packaging", "包装图", "开箱" | | | Box + product |
| "size comparison", "尺寸对比" | | | With reference object |
| "multiple products", "组合图" | | | Collection display |
| "360 view", "多角度" | | | Turntable style |
| "comparison", "对比图" | | | Side by side |
| "infographic", "功能标注" | | | Feature callouts |
| 用户表述 | 风格 | 背景 | 说明 |
|---|---|---|---|
| "特写"、"细节图"、"close-up" | | | 微距/纹理展示 |
| "包装图"、"开箱"、"packaging" | | | 包装盒+产品展示 |
| "尺寸对比"、"size comparison" | | | 搭配参考物体 |
| "多产品图"、"组合图"、"multiple products" | | | 系列产品展示 |
| "多角度图"、"360 view" | | | 转盘式展示 |
| "对比图"、"comparison" | | | 并排对比 |
| "功能标注"、"infographic" | | | 功能亮点标注 |
Seasonal & campaign
季节与营销活动
| User says | Style | Background | Notes |
|---|---|---|---|
| "spring campaign", "春季" | | auto | Cherry blossoms, pastel |
| "summer sale", "夏季" | | auto | Beach, tropical |
| "autumn/fall", "秋季" | | auto | Golden leaves, warm |
| "winter/holiday", "冬季", "圣诞" | | auto | Snow, festive |
| 用户表述 | 风格 | 背景 | 说明 |
|---|---|---|---|
| "春季营销"、"spring campaign" | | 自动 | 樱花、马卡龙色调 |
| "夏季促销"、"summer sale" | | 自动 | 海滩、热带风情 |
| "秋季"、"autumn/fall" | | 自动 | 金色落叶、温暖色调 |
| "冬季"、"圣诞"、"winter/holiday" | | 自动 | 雪景、节日氛围 |
Complete product set
完整产品图片套装
| User says | Function | Notes |
|---|---|---|
| "complete set", "全套产品图", "listing images" | | 7 images covering all angles |
| "Amazon listing set", "亚马逊全套" | | Platform-optimized set |
| 用户表述 | 功能 | 说明 |
|---|---|---|
| "全套产品图"、"complete set"、"listing images" | | 生成7张覆盖全角度的图片 |
| "Amazon全套商品图"、"Amazon listing set" | | 平台优化的图片套装 |
12. Usage examples by scenario
12. 场景使用示例
Amazon listing — white background hero shot
Amazon商品列表 — 白底主图
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/headphones.jpg",
platform="amazon",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/headphones.jpg",
platform="amazon",
)Lifestyle product photo
产品生活场景图
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/coffee_mug.jpg",
style="lifestyle",
background="lifestyle",
prompt="premium coffee mug on rustic wooden table beside an open book, morning sunlight",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/coffee_mug.jpg",
style="lifestyle",
background="lifestyle",
prompt="premium coffee mug on rustic wooden table beside an open book, morning sunlight",
)Product detail close-up
产品细节特写图
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/leather_bag.jpg",
style="detail",
background="studio",
prompt="extreme close-up of leather stitching and grain texture",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/leather_bag.jpg",
style="detail",
background="studio",
prompt="extreme close-up of leather stitching and grain texture",
)Seasonal campaign — winter holiday
季节营销活动 — 冬季节日
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/candle.jpg",
style="seasonal_winter",
prompt="luxury scented candle in cozy holiday setting with pine branches and warm glow",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/candle.jpg",
style="seasonal_winter",
prompt="luxury scented candle in cozy holiday setting with pine branches and warm glow",
)Text-to-image — generate product from description
文本生成图片 — 根据描述生成产品
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
prompt="sleek minimalist smartwatch with black silicone band and OLED display showing time",
style="hero",
background="gradient",
model="gpt",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
prompt="sleek minimalist smartwatch with black silicone band and OLED display showing time",
style="hero",
background="gradient",
model="gpt",
)Flat lay for Instagram / Xiaohongshu
Instagram/小红书平铺俯拍图
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/skincare_set.jpg",
style="flat_lay",
background="textured",
platform="xiaohongshu",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/skincare_set.jpg",
style="flat_lay",
background="textured",
platform="xiaohongshu",
)Multiple images — batch generation
批量生成多张图片
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/sneakers.jpg",
style="hero",
background="white",
count=4,
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
product_path="uploads/sneakers.jpg",
style="hero",
background="white",
count=4,
)Generates 4 variations of the hero shot
生成4张主图变体
undefinedundefinedComplete product image set
完整产品图片套装
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
product_path="uploads/wallet.jpg",
prompt="premium leather bifold wallet",
platform="amazon",
)python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
product_path="uploads/wallet.jpg",
prompt="premium leather bifold wallet",
platform="amazon",
)result -> {"success": True, "sets": [...], "total_images": 7, ...}
result -> {"success": True, "sets": [...], "total_images": 7, ...}
Generates: hero, lifestyle, detail, scale, alternate angle, packaging, flat lay
生成:主图、生活场景图、细节图、尺寸参考图、多角度图、包装图、平铺俯拍图
---
---13. Prompt engineering best practices
13. 提示词优化最佳实践
The product photography prompt structure
产品摄影提示词结构
Every effective product photo prompt should include these elements:
[product description], [photography style], [lighting], [background/surface], [composition], [quality modifiers]有效的产品摄影提示词应包含以下元素:
[产品描述], [摄影风格], [光线], [背景/表面], [构图], [画质修饰词]Key principles (derived from product-photography, eachlabs-product-visuals, image-create skills)
核心原则(源自product-photography、eachlabs-product-visuals、image-create技能)
-
Product preservation is critical — when editing an existing product image:
- Always emphasize "keep the product exactly as it is"
- Preserve shape, color, branding, and details
- Only change the background/context/lighting
-
Lighting specificity — always specify lighting type:
- Studio: "soft diffused studio lighting", "even lighting with no shadows"
- Dramatic: "dramatic rim lighting", "edge light for premium feel"
- Natural: "natural window light", "golden hour warm light"
- Flat: "flat even lighting" (for e-commerce white background)
-
Background precision — vague backgrounds produce poor results:
- ❌ "nice background"
- ✅ "pure white background #FFFFFF, no shadows"
- ✅ "rustic wooden table with morning sunlight"
- ✅ "soft gradient from white to light grey"
-
Composition rules (from product-photography skill):
- Hero shot: product fills 80% of frame, slight 15-30° angle
- Packshot (Amazon): product dead center, fills 85%+
- Flat lay: bird's eye view, organized arrangement
- Group: odd numbers (3 or 5), triangle composition
-
Shadow types matter:
- No shadow: Amazon/e-commerce requirements
- Contact shadow: grounded but clean
- Drop shadow: adds depth, professional
- Reflection: tech, luxury, premium feel
-
Material and texture — for detail shots, specify:
- "visible leather grain and stitching"
- "brushed metal finish with subtle reflections"
- "soft fabric texture, thread detail visible"
-
Platform compliance — when targeting a specific platform:
- Amazon: pure white (RGB 255,255,255), no props/text/watermarks
- Instagram: lifestyle context, visually appealing
- Xiaohongshu: vertical format, aesthetic, text overlay space
-
产品还原至关重要 — 编辑现有产品图片时:
- 始终强调“保持产品原样”
- 保留产品形状、颜色、品牌标识和细节
- 仅修改背景/环境/光线
-
光线明确性 — 始终指定光线类型:
- 工作室光线:“柔和漫射工作室光线”、“均匀无阴影光线”
- 戏剧性光线:“戏剧性轮廓光”、“边缘光营造高端质感”
- 自然光:“自然窗光”、“黄金时段暖光”
- 平光:“均匀平光”(适用于电商白底图)
-
背景精准性 — 模糊的背景描述会导致效果不佳:
- ❌ “好看的背景”
- ✅ “纯白背景#FFFFFF,无阴影”
- ✅ “质朴木桌搭配清晨阳光”
- ✅ “从白色到浅灰色的柔和渐变”
-
构图规则(源自product-photography技能):
- 主图:产品占画面80%,轻微15-30°角度
- 产品图(Amazon风格):产品居中,占比85%以上
- 平铺俯拍:鸟瞰视角,布局整齐
- 产品组:奇数数量(3或5个),三角形构图
-
阴影类型影响效果:
- 无阴影:Amazon/电商要求
- 接触阴影:产品落地感强且干净
- 投影:增加层次感,专业风格
- 倒影:科技、高端产品适用
-
材质与纹理 — 细节图需明确:
- “可见皮革纹理与缝线”
- “拉丝金属质感带轻微反光”
- “柔软织物纹理,可见缝线细节”
-
平台合规性 — 针对特定平台时:
- Amazon:纯白背景(RGB 255,255,255),无道具/文字/水印
- Instagram:生活场景背景,视觉吸引力强
- 小红书:竖版格式,美观布局,预留文字叠加空间
Example: building a custom prompt
示例:构建自定义提示词
User request: "I need a hero shot of my leather wallet for Amazon"
python
result = product_photo(
product_path="uploads/wallet.jpg",
platform="amazon",
prompt="premium leather bifold wallet, rich brown color, slight angle showing card slots",
)The script automatically builds:
Transform this product image into a professional e-commerce photo.
Keep the product exactly as it is — preserve its shape, color, details, and branding.
premium leather bifold wallet, rich brown color, slight angle showing card slots.
Photography style: professional product hero shot, clean composition, studio lighting...
Background: pure white background #FFFFFF, clean, e-commerce standard, no shadows.用户请求:“我需要一张用于Amazon的皮革钱包主图”
python
result = product_photo(
product_path="uploads/wallet.jpg",
platform="amazon",
prompt="premium leather bifold wallet, rich brown color, slight angle showing card slots",
)脚本会自动生成完整提示词:
将此产品图片转换为专业电商照片。
保持产品原样——保留其形状、颜色、细节和品牌标识。
premium leather bifold wallet, rich brown color, slight angle showing card slots.
摄影风格:专业产品主图,简洁构图,工作室光线...
背景:纯白背景#FFFFFF,干净,电商标准,无阴影。14. E-commerce image set guide
14. 电商图片套装指南
A complete product listing needs 7-9 images. Use for automatic generation, or create individual shots:
product_photo_set()| Position | Image Type | Style | Background | Purpose |
|---|---|---|---|---|
| 1 | Hero / packshot | | | Primary listing image |
| 2 | Lifestyle | | | Product in use/context |
| 3 | Detail close-up | | | Material quality, craftsmanship |
| 4 | Scale reference | | | Size in hand or next to known object |
| 5 | Alternate angle | | | Back or side view |
| 6 | Packaging | | | Unboxing experience |
| 7 | Flat lay | | | Arranged composition |
| 8 | Infographic | | | Dimensions, specs, features |
| 9 | Seasonal | | auto | Campaign-specific |
完整的商品列表需要7-9张图片。可使用自动生成,或手动创建单张图片:
product_photo_set()| 位置 | 图片类型 | 风格 | 背景 | 用途 |
|---|---|---|---|---|
| 1 | 主图/产品图 | | | 商品列表首图 |
| 2 | 生活场景图 | | | 产品使用场景展示 |
| 3 | 细节特写图 | | | 材质质感、工艺展示 |
| 4 | 尺寸参考图 | | | 手持或与已知物体对比展示大小 |
| 5 | 多角度图 | | | 背面或侧面视图 |
| 6 | 包装图 | | | 开箱体验展示 |
| 7 | 平铺俯拍图 | | | 布局式展示 |
| 8 | 信息图表 | | | 尺寸、参数、功能展示 |
| 9 | 季节主题图 | | 自动 | 营销活动专属 |
15. Error handling
15. 错误处理
The script returns structured results. Always check :
successpython
result = product_photo(product_path="uploads/product.jpg")
if result["success"]:
for img in result["images"]:
print(f"Saved: {img['local_path']}")
else:
print(f"Error: {result.get('error')}")Common errors:
- — check the product_path
"File not found" - — use JPG, PNG, or WebP
"Unsupported image format" - — max 10 MB
"Image too large" - — provide product_path/product_url or prompt
"Either a product image or a prompt is required" - — check available presets in §7/§8
"Unknown style/background"
脚本会返回结构化结果,务必检查字段:
successpython
result = product_photo(product_path="uploads/product.jpg")
if result["success"]:
for img in result["images"]:
print(f"已保存:{img['local_path']}")
else:
print(f"错误:{result.get('error')}")常见错误:
- — 检查product_path是否正确
"File not found" - — 使用JPG、PNG或WebP格式
"Unsupported image format" - — 图片最大不超过10 MB
"Image too large" - — 需提供product_path/product_url或prompt
"Either a product image or a prompt is required" - — 检查第7/8节中的可用预设
"Unknown style/background"