I have an image and I want to resize this.
App Script code:
var fileId = 'idImage';
var img = DriveApp.getFileById(fileId).getBlob().;
newFile.getBody().insertImage(0, img);
Object Blob can't resize so how can I resize my image?
Regards
I found a solution :
var fileId = 'ImageID';
var img = DriveApp.getFileById(fileId).getBlob();
var imgDoc = newFile.getBody().insertImage(0, img);
imgDoc.setWidth(630);
It's an inlineImage
object.
link : https://developers.google.com/apps-script/reference/document/inline-image