Find and replace picture
Swap pictures, found by alternative text or by their order across the slides, for a new image file, keeping the position and, unless a new size is given, the size.
Command in the PowerPoint toolkit · id ooa.powerpoint/find_replace_picture · 10 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Image | File | Yes | New image file. | |
| Alt text | String | No | Replace every picture whose alternative text equals this. | |
| Index | Number | No | 1-based position of the picture counting across all slides; used when alt_text is empty. | |
| Session | String | No | powerpoint | Presentation session. |
| Slide | Number | No | Only look on this 1-based slide (index then counts on that slide); all slides when empty. | |
| Occurrence | String | No | all | With alt_text: replace all matching pictures, or only the first or last one in slide order. |
| New alt text | String | No | New alternative text for the replaced pictures; kept when empty. | |
| Width | Number | No | New width in points; the current size is kept when width and height are empty. | |
| Height | Number | No | New height in points. | |
| Keep aspect ratio | Boolean | No | true | When only width or only height is given, scale the other side to the new image's proportions. |
Outputs
| Output | Type | What it is |
|---|---|---|
| count | Number | Number of pictures replaced. |