title: Google sheet insertImage function stopped working for Google Apps Script: verify image error
body: <p>I have been using the <a href="https://developers.google.com/apps-script/reference/spreadsheet/sheet#insertimageurl,-column,-row,-offsetx,-offsety" rel="nofollow noreferrer">insertImage function</a> to insert images saved on my Drive into Google sheets daily for several months. Today it has stopped working with the following error message:</p>
  <pre><code>Exception: The image could not be inserted. Please verify it is valid and try again.
  </code></pre>
  <p>The procedure that has always worked was to get the file ID, retrieve the link, fetch the image from the link and insert the image. This is illustrated in the code below:</p>
  <pre><code>  var blob = DriveApp.getFileById(fileID).getBlob()
    var width = 340; 
    var link = Drive.Files.get(fileID).thumbnailLink.replace(/\=s.+/, &quot;=s&quot; + width);
    var blob2 = UrlFetchApp.fetch(link).getBlob()
    var the_image = TemplateSheet.insertImage(blob2, 3, 13, 110, 0);
  
  </code></pre>
  <p>When I visit the &quot;link&quot; I am directed to the image as expected. I can also save &quot;blob2&quot; as an image and use it in other ways without any errors. Can anyone assist with a solution to the error I am receiving?</p>