The Google Slides API inserts an image from a URL that the service can retrieve. This differs from selecting a local file in the browser editor. Plan source access carefully and avoid exposing a confidential image publicly merely to make an integration convenient.
Prepare a suitable image source
Google’s image guide requires a publicly accessible image URL for CreateImageRequest. It specifies PNG, JPEG, or GIF, under fifty megabytes and no more than twenty-five megapixels. Check the actual file rather than assuming a page URL points directly to supported image data.
If temporary authorized access is appropriate, design that access through the organization’s approved storage workflow. A URL’s expiry and deletion of a stored object are different concepts and must be verified separately.
Create the image element
Use CreateImageRequest with the intended slide reference and source URL. Set the element’s size and transform deliberately, using documented units and geometry. Preserve the image’s aspect ratio rather than applying arbitrary scaling that distorts its subject.
Inspect the resulting slide
Read the response and open the presentation to check the inserted image, crop, position, and clarity. Confirm that the intended version was retrieved and that any visible labels remain readable. Review source credits and the audience’s exposure to the image. A successful API insertion is not evidence of licensing permission, factual accuracy, secure removal of hidden source details, or automatic cleanup of a separately hosted image. Keep those responsibilities explicit in the integration’s maintenance process. Check the actual retrieved image version.
References
- Add images to a slide | Google Slides | Google for Developers
- Size and position page elements | Google Slides | Google for Developers
Reviewed against the linked official product guidance on November 3, 2026. Features, limits, screen labels, and access can vary by account, platform, region, and organization policy.