PowerPoint Generator API
  • PowerPoint Generator API
  • Getting started
    • Quick start
  • API reference
    • token/create
    • generator/create
  • Knowledge base
    • Key concepts
    • Templating your presentation
    • Building your JSON payload
    • Finding shape names
  • JSON/ PPTX Reference
    • presentation
    • slides
    • shapes
      • textbox
      • chart
      • picture
      • table
    • tags
    • Deprecated
  • Examples
    • Presentation
      • Naming output presentation
      • Using multiple templates
    • Slide
      • Change shape size and position
      • Change shape background color
      • Hide or remove shape
      • Replacing tags
    • Textboxes
      • Add text
      • Set font type and size
      • Set font color and font background color
      • Set bold, italic & underline
      • Set text alignment
      • Set text indentation
      • Set text line spacing
      • Using bullet-points
    • Chart
      • Change font settings
      • Insert data
      • Adjust chart legend
      • Appending to data labels
    • Pictures
    • Table
      • Populate simple table
      • Using `text_runs` in Table cells
      • Handling merged cells
      • Update a specific cells in existing table
    • Tags
Powered by GitBook
On this page

Was this helpful?

  1. Examples

Pictures

Replace an existing image placeholder with a new image. New image will inherit the size and positioning of the existing image placeholder.

PreviousAppending to data labelsNextTable

Last updated 1 year ago

Was this helpful?

  1. Specify name of shape to be amended. This outlines how to find out name of the shape.

  2. Insert path of new image to filename property. This can be:

    1. a downloadable URL link as a string

    2. or a file attachment

Before and after:

Template Presentation

Image File

JSON Payload

{
  "presentation": {
    "template": "replace_image_template.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide",
        "slide_index": 1,
        "shapes": [
          {
            "name": "Picture 1",
            "filename": "happy with automation.jpg"
          }
        ]
      }
    ]
  }
}
page
815KB
replace_image_template.pptx
118KB
happy with automation.jpg
image