Insert an image
create_imageAdd an image to a slide in Google Slides using a public image URL or a local file, with optional position and size controls.
Instructions
Inserts an image on a slide (batchUpdate createImage) from EITHER image_url — a public https URL Google's servers can fetch (validated: https-only, no private/local hosts, ≤2 kB; the image itself must be PNG/JPEG/GIF, ≤50 MB, ≤25 megapixels) — OR image_path, a local file that is checked by magic bytes, uploaded to Drive, shared by link for the fetch and DELETED from Drive right after (Slides stores its own copy, so the temp file is disposable; the result reports the cleanup). Omitted size keeps the image's native proportions fitted to the page; position/size are in points. Returns the image objectId in the reply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x_pt | No | Left edge in points (requires y_pt). | |
| y_pt | No | Top edge in points (requires x_pt). | |
| width_pt | No | Width in points (requires height_pt). | |
| height_pt | No | Height in points (requires width_pt). | |
| image_url | No | Public https URL of a PNG/JPEG/GIF (exactly one of image_url / image_path). | |
| object_id | No | Optional custom object id for the new image. | |
| image_path | No | Absolute local path of a PNG/JPEG/GIF file (exactly one of image_url / image_path). | |
| page_object_id | Yes | The slide's object id to place the image on (from list_slides). | |
| presentation_id | Yes | The presentation id — the long id from the URL (docs.google.com/presentation/d/<presentationId>/edit) or from create_presentation output. |