photoshop_recipe_batch_mockup_replace
Batch-render a mockup PSD for every asset image by replacing a named Smart Object and exporting a flattened JPEG per variant, preserving the mockup's perspective.
Instructions
Iterate a directory of asset images, replace the contents of the named Smart Object in the active mockup PSD for each asset, and export a flattened JPEG per variant. The mockup's perspective/warp on the Smart Object is preserved.
Use when: the user has a mockup PSD and wants to render it once per design asset (logos, screens, product photos). Do NOT use when: the asset is not a single layer (use photoshop_place_image manually) or when the active document has no Smart Object with the requested name.
Returns: { ok, summary, output_paths, details: { variants: [{ source_asset, output_path }] } }.
Preconditions: active document containing a Smart Object layer named exactly as requested; assets_dir must exist and be readable. Side effects: writes one JPEG per asset; the active mockup PSD ends up with the LAST asset placed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quality | No | JPEG quality on the Photoshop 1-12 scale. Default 10. | |
| assets_dir | Yes | Absolute path to the directory containing asset files. Subdirectories are NOT recursed. Allowed extensions: jpg/jpeg/png/tif/tiff/psd/psb/webp. | |
| document_id | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit. | |
| smart_object_layer_name | Yes | Exact name of the Smart Object layer in the active document. Case-sensitive. |