0

When I try the function like below, it does show the image (found this on an similar question).

function showDialog() {

  var ui = SpreadsheetApp.getUi();
  // Display a modal dialog box with custom HtmlService content.
  var htmlOutput = HtmlService
    .createHtmlOutput('<img src=https://i.stack.imgur.com/AuqJU.gif>')
    .setWidth(250)
    .setHeight(300);
  ui.showModalDialog(htmlOutput, 'Script Running');      
}

But when I replace the imgur image with one from my shared drive, it doesn't show up (it shows the broken image logo).

The image I'm using is https://drive.google.com/file/d/1uvdBRlfx9C59TTvq8VtVLIpa8u_0B9RN/view?usp=sharing

I've tried to trim it down to https://drive.google.com/file/d/1uvdBRlfx9C59TTvq8VtVLIpa8u_0B9RN/view, but it still doesn't work. I can't find much information about this problem so far, so I hope some of you could help me out!

1 Answers1

0

The link to your google drive image is not correct. Try this link. https://lh4.googleusercontent.com/gefri8GtJB97QxtqkjAC6e7kfhoPCaSc4gEzK7sXb_bZa5LEUBvLHZmg9-3iPi-mRdWsR_7oAQJhPrUIRGK7=w1920-h882

I extracted this link by inspecting the drive view page

Niteesh
  • 2,742
  • 3
  • 12
  • 33