To update an image in Google Slides via a URL every day, you can use Google Apps Script. Here’s a step-by-step guide on how to do this:
- Open the Google Slides presentation where you’ve inserted the image via URL.
- Click on Tools > Script editor. This will open a new tab with the Google Apps Script editor.
- In the script editor, paste the following code:
function updateImage() {
var slide = SlidesApp.getActivePresentation().getSlides()[0]; // Change the slide index if needed
var imageUrl = “INSERT_IMAGE_URL_HERE”; // Replace with your image URL
var image = slide.getImages()[0]; // Change the image index if needed
image.replace(imageUrl);
}
- Replace “INSERT_IMAGE_URL_HERE” in the code with the URL of the image you want to update.
- Save the script with a name (e.g. “Update Image Script”).
- Click on the clock icon in the script editor toolbar to open the Triggers dialog.
- Click on the “Add Trigger” button.
- In the “Run” dropdown, select the name of your function (“updateImage”).
- In the “Select event type” dropdown, select “Time-driven.”
- Set the time interval you want the image to be updated (e.g. every day at 9:00 AM).
- Click on the “Save” button to create the trigger.
That’s it! Now the script will run every day at the specified time and update the image in the first slide of your Google Slides presentation with the new URL you’ve provided.
Recent Comments