Using SpreadsheetApp.newCellImage()
do work by using the following methods,.setSourceUrl().build()
and here's a code snippet that could help.
function myFunction() {
const image = "-DataURI-"
const imageBuild = SpreadsheetApp.newCellImage().setSourceUrl(image).build()
const sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange(1, 1).setValue(imageBuild);
}
Sample Output:
References: