2

I am new to Google App Script and opened the tutorial to create a button add-on that creates a cat image with a text: https://developers.google.com/gsuite/add-ons/cats-quickstart

The script manifest of this sample App includes a link to a logo image (a paw) which is displayed on the right-hand side. The logo image is hosted by a static website from Google:

"logoUrl": "https://www.gstatic.com/images/icons/material/system/1x/pets_black_48dp.png",

I tried to replace this image by a different logo: new logo image

I uploaded this image to my Google Drive, with a shareable link (no password, everyone can view).

sharing permissions of the new logo image

Here is the new line in the manifest with the new URL for the logo

      "logoUrl": "https://drive.google.com/file/d/1OXYP8c2io6lBy2KroFAqBINPUBpH-uqr/view?usp=sharing",

This didn't work and shows a white square instead of the PNG image (same size, same format).

new logo image doesn't isn't displayed in the App menu bar

I assume Google Drive is not the ideal place to store static images. Is there a simple way to store static images (e.g., the app logo) for a Google App Script?

  • Does this answer your question? [Displaying files (e.g. images) stored in Google Drive on a website](https://stackoverflow.com/questions/10311092/displaying-files-e-g-images-stored-in-google-drive-on-a-website) – Iamblichus May 19 '20 at 08:07

2 Answers2

1

I don't know if this is considered "simple" or not, but the Google Cloud Platform Free Tier is not hard to set up, and Cloud Storage should do what you want.

Your "logoUrl" would then be at something like:

https://storage.cloud.google.com/my-project-bucket/my-image.png

T Hallman
  • 83
  • 1
  • 3
0

If you look closely at the first url and the second, you'll see the first ends with .png which is a type of image file. Your google url is different. And as a result, requires a little more work.

You need to get a shareable link and then tweak that link to just include just the id. More through explanation here.

Stykes
  • 306
  • 6
  • 15