Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Images Request → Replace Image

AI-generated

Summary

Replace an image in a Google Docs document

Inputs

  • imageObjectId (required) — The ID of the existing image that will be replaced
  • uri (required) — The URI of the new image
  • additionalFields — Additional fields to include in the request; for example the tab ID where the image to be replaced is located.

Output shape

a single result object

May include the replaced image ID; otherwise the operation returns no body, signaling success or failure via HTTP status.

Examples

Example 1: Replace a logo in a document header

imageObjectId: 'logo-id'; uri: 'https://example.com/logo.png'; additionalFields: {tabId: '1'}

Links

Discussion