Replace Image By Id
Replaces an existing image in a Google Slides presentation with a new image using the image object ID.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Presentation Id - The ID of the Google Slides presentation containing the image to replace.
- Image Object Id - The unique identifier of the image object to be replaced.
- Replacement Image Url - The URL of the new image that will replace the existing one.
Options
- Image Replace Method - The method used to fit the replacement image:
- Center Inside - Scales the image to fit entirely within the original image boundaries while maintaining aspect ratio
- Center Crop - Scales and crops the image to fill the original image boundaries while maintaining aspect ratio
How It Works
The Replace Image By Id node updates an existing image in a Google Slides presentation with a new image. When executed, the node:
- Validates the provided inputs (Presentation Id, Image Object Id, Replacement Image Url)
- Connects to the specified Google Slides presentation
- Locates the image object using the provided Image Object Id
- Replaces the existing image with the new image from the provided URL
- Applies the specified image fitting method
Requirements
- A valid Google Slides presentation ID
- Valid Google Slides API credentials
- A valid Image Object Id for the image to be replaced
- A publicly accessible URL for the replacement image
- Proper permissions to modify the presentation
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Presentation Id
- Empty or invalid Image Object Id
- Empty or invalid Replacement Image Url
- Google Slides API authentication errors
- Insufficient permissions to modify the presentation
- Invalid presentation ID
- Invalid image object ID
- Google Slides service errors
Usage Notes
- The Presentation Id can be found in the URL of the Google Slides presentation
- The Image Object Id can be obtained using the Get Presentation node with the "Return Element IDs" option
- The Replacement Image Url must be publicly accessible (not behind authentication)
- The Image Replace Method determines how the new image fits within the original image boundaries:
- Center Inside - Ensures the entire replacement image is visible but may leave empty space
- Center Crop - Fills the entire original image area but may crop parts of the replacement image
- The replaced image maintains its position and size on the slide
- This node is useful for updating images in templates or regularly updated presentations
- Supported image formats include JPG, PNG, GIF, and other web-friendly formats