Although I'm not sure whether this workaround is useful for your situation, how about this answer? I always use for adding the title and description using Slides API, because I couldn't find the methods in SlidesApp. The sample script is as follows. In this case, I used batchUpdate of Slides API.
Sample script :
var id = currentPage.insertImage(imageUrl, left, top, width, height).getObjectId();
SlidesApp.getActivePresentation().saveAndClose(); // Important
var resource = {"requests": [
{"updatePageElementAltText": {
"objectId": id,
"description": "sampleDescription",
"title": "sampleTitle"
}
}]};
Slides.Presentations.batchUpdate(resource, presentationId);
var fields = {fields: "pageElements(description,objectId,title)"};
var ele = Slides.Presentations.Pages.get(presentationId, currentPage.getObjectId(), fields).pageElements;
ele.forEach(function(e){
if (e.objectId == id) {
Logger.log(e)
}
});
Note :
- When you use this script
- Please enable Slides API at advanced Google services and API console.
- Please prepare
presentationId and currentPage.
- Please use
saveAndClose() after the image is inserted.
Reference :
Updated at November 20, 2018:
The Slides service was updated at Google's update at November 14, 2018, and several methods were added for achieving this issue.
new methods let you add alt titles and alt descriptions to page elements. The following methods have been added to the Group, Image, Line, PageElement, Shape, SheetsChart, Table, Video, and WordArt classes
- setDescription(description)
- setTitle(title)