photoshop_recipe_prepare_for_web
Export a web-ready JPEG or PNG from the active Photoshop document by converting to sRGB, downscaling the longest edge, and sharpening for screen, leaving the original untouched.
Instructions
Export a web-optimized version of the active document: duplicate, convert to sRGB, downscale longest edge, sharpen for screen, save to disk. The source PSD stays untouched.
Use when: the user wants a shareable JPEG/PNG sized for the web from the current artwork. Do NOT use when: the user wants multiple platform-specific exports — use photoshop_recipe_export_social_variants. Do NOT call photoshop_save_document afterwards; this recipe already wrote the file.
Returns: { ok, summary, output_paths, undo_history_states_consumed }.
Preconditions: active document. Format is jpeg (default) or png. Side effects: writes one file to disk; the source document is unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional output path. Absolute paths used as-is. Relative paths resolve under ~/.photoshop-mcp/exports[/<chat-id>]. Omit to auto-generate. | |
| format | No | Output format: jpeg (default) or png. | jpeg |
| quality | No | JPEG quality on the Photoshop 1-12 scale. Default 9. Ignored for png. | |
| 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. | |
| max_dimension_px | No | Longest-edge pixel cap (default 2048). Min 64, max 8192. |