Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Images Request → Insert Inline Image

AI-generated

Summary

Insert an inline image into a Google Doc at a specified location

Inputs

  • uri — The URI of the image to insert
  • height — The height of the image in points
  • width — The width of the image in points
  • insertionLocation — The location type where the image will be inserted (e.g., "location" or "endOfSegmentLocation")
  • additionalLocationFields — Additional fields for segment‑based insertion, such as segment ID or tab ID
  • index (required) — Zero‑based UTF‑16 index of the insertion point relative to the start of the segment defined by segmentId

Output shape

a single acknowledgement object indicating success or failure

On success no response body is returned; errors are surface as Google Docs API error details

Examples

Example 1: Insert an image from a public URL at the start of the document body

uri=https://example.com/logo.png, index=0, insertionLocation=location, additionalLocationFields={}

Links

Discussion