Google Slides Deck Image Replacer

Automatically replace images in Google Slides presentations using Drive folder assets

Getting started

Overview

This tool automates the process of swapping out images in a Google Slides deck to create new decks for different locales. It uses a template that has had the images tagged with base filenames, and compares the base filenames to the filenames in the folder containing all the images for that locale deck. It populates the deck by matching the base filenames.

Security Note: The tool always creates a copy of your original presentation — your template deck is never modified.
This tool runs entirely within Google's infrastructure — no data is sent to external servers.
First use: Authorize the script

The first time you run the tool, you'll need to authorize it to access your Google Drive and Slides:

    • Open Google Slides Image Replacer
    • Click Image Swapper in the menu and select either option
    • A dialog will appear saying "Authorization required" — click Review permissions
    • Select your Google account
    • Review the permissions, click Select all, and click Allow
    Quick reference workflow
    • Step 1 — Tag images in your template
      Add alt-text titles to each image you want replaced. Images without a title are skipped.
    • Step 2 — Upload replacement images
      Add your replacement images to a Google Drive folder, named to match your alt-text titles.
    • Step 3 — Preview changes
      Use Image Swapper → Preview Changes to verify matches before committing.
    • Step 4 — Replace
      Use Image Swapper → Run Image Replacement to perform the replacement.

Preparing the deck template

Before using the tool, you must:

  • set all template images to placeholders. This makes it easy to see if an image isn't replaced.
  • tag each image in your template with an alt-text title. This title tells the tool which replacement image to use for each placeholder.

How to tag the template

+
  • Open your Google Slides presentation
  • Click on an image you want to be replaceable
  • Right-click and select "Alt text", or use the menu: Format > Alt text
  • In the dialog that appears, click Advanced options
  • Enter a Title that matches the base filename of your replacement image, without the locale code or the file extension
  • Security Critically important: You must click off the image and then click on the next image you want to tag. If you click directly on the next image, Google Slides will not save the new tag entered into the alt title. Click out of the image every single time before clicking the next image
  • Check each alt title you added before moving on to the next slide, Google Slides is tetchy
  • Repeat for every image you want replaced
Security Note: If the locale you are generating has any difference from the standard en-US template, you will have to make those changes manually. Any additions or removals must be done manually.
Tip: Images without an alt-text title are automatically skipped, allowing you to keep some images static while replacing others.
Naming convention

The alt-text title you set must match the filename of the replacement image, minus the file extension. For localized images, the tool automatically strips locale codes.

hero-banner_es-ES.png
Alt-text title to use: hero-banner
product-photo_en-CA.jpg
Alt-text title to use: product-photo
chart_01_de-DE.png
Alt-text title to use: chart_01
logo.png
Alt-text title to use: logo

Because locale codes are stripped automatically, both logo_es-ES.png and logo_de-DE.png will match the alt-text title logo. This means you only need to set the title once per image slot regardless of which locale's images are in your folder.

What gets replaced vs. skipped
  • Replaced: Any image with a matching alt-text title
  • Skipped: Images with no alt-text title set
  • Also replaced: Images in master slides and layout slides — the tool checks these in addition to regular slide content

Preparing replacement images

Setting up your Drive folder
  • Create a folder in Google Drive (Shared Drives are also supported)
  • Upload all images you wish to populate the deck with into this folder
  • Make sure the filenames match specs
Example folder structure
My-Replacement-Images-Folder/
├── hero-banner.png
├── product-photo.jpg
├── chart_01.png
└── logo.png
Multiple files with the same name

If multiple files in your folder match the same alt-text title, the tool uses the first file alphabetically. To avoid unpredictable results, make sure each alt-text title maps to exactly one file in your folder.

Good practice: Keep naming simple and consistent. The fewer ambiguities in your filenames, the less cleanup you'll need to do after a preview run.

Using the tool

    Accessing the tool
  • Open Google Slides Image Replacer. You will see an empty Google Sheet, this is normal.
  • Preview Changes (Dry Run) — Shows what would happen without making changes
  • Run Image Replacement — Performs the actual image replacement
Dialog fields

When you select either option, a dialog will appear.

    Image swapper options
  • Preview Changes (Dry Run) — Shows what would happen without making changes
  • Run Image Replacement — Performs the actual image replacement
Presentation URL Required
The full URL of your Google Slides template. Open your presentation in Google Slides and copy the URL from the browser address bar.

Example: https://docs.google.com/presentation/d/1ABC123xyz.../edit
Source Image Folder URL Required
The full URL of the Drive folder containing your replacement images. Open the folder in Google Drive and copy the URL from the address bar.

Example: https://drive.google.com/drive/folders/1XYZ789abc...
New Presentation Name Required
The name for your new presentation copy. The tool always creates a copy to preserve your template.

Example: Product Guide - German
Destination Folder URL Optional
Where to save the newly created deck. If left blank, the copy is saved in the same location as the original.
Preview vs. Replace

You have two options. Running a preview first is strongly recommended.

Preview Changes (Dry Run)

+

Select Image Swapper → Preview Changes (Dry Run) to run a dry-run without modifying or copying anything. The results will show:

  • Matched — Images that will be successfully replaced
  • Failed to match — Images with alt-text titles that couldn't be matched to any file in your folder
  • Skipped — Images without alt-text titles
Note: Always preview before replacing to catch naming mismatches before they end up in your output deck.

Run Image Replacement

+

Select Image Swapper → Run Image Replacement to perform the replacement. The tool will:

  • Create a copy of your template with the name you provide
  • Replace all matched images in the copy with the new versions from your Drive folder
  • Save the new presentation to your specified destination folder (or the same location as the original)
  • Display a summary with a link to open the new presentation
Security Your template is always preserved. The tool requires a new presentation name and always creates a copy — your original template is never modified.

Understanding results

After running a preview or replacement, the tool displays a results summary broken into three categories.

Successful matches

Each image that was matched and will be (or was) replaced. Includes the alt-text title from the slide, the replacement filename used, and the slide number where it was found.

Failed matches

Images that couldn't be matched to any file in your Drive folder. The results will show the alt-text title that wasn't found and suggestions for similar filenames already in your folder. Use these suggestions to identify typos or inconsistencies in your naming.

Skipped images

Images that were skipped because they had no alt-text title set. These are intentionally ignored and require no action unless you actually want them replaced — in which case, go back and add an alt-text title to the image in your template.

One image per name: If multiple files in your folder matched the same alt-text title, the tool will note which one it used (the first alphabetically). If this wasn't the file you intended, rename or remove the others.

Troubleshooting

"Image Swapper" menu doesn't appear

+
  • Refresh the page and wait 10-15 seconds for the menu to load

"No matches found"

+
  • Verify your alt-text titles match your image filenames exactly, without file extensions
  • Check for typos or extra spaces in either the alt-text title or the filename
  • Run a preview to see which images failed to match
  • Confirm the correct Drive folder URL was entered — it's easy to grab a subfolder instead of the intended parent

"Image skipped" — but I wanted it replaced

+
  • The image has no alt-text title set in the slide
  • Right-click the image in Google Slides, select Alt text, and add a Title that matches your replacement filename, the same way you would tag the image in the template
  • Note: only the Title field matters — the Description field is not used for matching

"Could not open presentation/folder"

+
  • Ensure you have at least view access to both the presentation and the Drive folder
  • For Shared Drive folders, confirm the folder is not restricted to specific users who don't include your account
  • Verify the URL is correct and complete

"Multiple matches found"

+
  • More than one file in your folder matches the same alt-text title after locale code stripping
  • The tool uses the first file alphabetically — check the results to confirm it picked the right one
  • If it picked the wrong file, rename or remove the unintended match from the folder

Wrong image replaced a slot

+
  • Your original template is untouched — nothing is permanently broken
  • Check that the alt-text title in the slide and the filename in Drive match exactly
  • Verify there are no duplicate or similarly-named files in the folder causing an unintended alphabetical match
  • Correct the naming, then run the tool again to generate a fresh copy

Script runs slowly

+
  • Large presentations with many images take longer to process
  • High-resolution images take longer to transfer