2

The sample Google Apps Script Add-on found here: https://developers.google.com/apps-script/add-ons/cats-quickstart uses the following logoUrl in the Add-on manifest

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

I'd like to be able to use other icons from that source How can I get URLs for other icons available at https://www.gstatic.com/images/icons/material What are other good sources for logoUrl icons?

Thanks

I tried putting an icon (.png) on My Drive in our domain, and use the file URL in logoUrl That did not work (permissions problem?)

1 Answers1

3

Try altering the gstatic url. By experimenting with the url path you can fetch different icons with different settings.

The icons names are the same as those for Google's material icons which you can find at the link below:

Google Material Icons

For example, if you wanted to use the face icon, colored black, with dimensions 48x48 pixels you'd alter that url as follows:

https://www.gstatic.com/images/icons/material/system/1x/face_black_48dp.png

Which looks like:

Note: In the gstatic URL, the icon name is always in lower-case.


Some names may have multiple words. In those cases, use the underscore character(_) to join them in the url. So for the Face 2 icon, you'd do as follows:

https://www.gstatic.com/images/icons/material/system/1x/face_2_black_48dp.png

Which looks like:


Note that the numerical values in the URL are not arbitrary, for example there are a limited number of sizes you can set; 18, 24, 36, and 48. You can find more info about that at the link below:

https://developers.google.com/fonts/docs/material_icons

If you need the icon to be larger than the allowed values, you can change the 1x to something else. So to double the size of the last image:

https://www.gstatic.com/images/icons/material/system/2x/face_2_black_48dp.png

Which looks like:

TheAddonDepot
  • 8,408
  • 2
  • 20
  • 30
  • Thanks very much! That is very helpful. Have you figured out any way to introduce color in the icons? I tried replacing black in the url with various other colors, but that didn't seem to work. – MumblingFumbler Dec 12 '22 at 07:29
  • @MumblingFumbler There only appears to be 2 options available when it comes to color; black or white. – TheAddonDepot Dec 12 '22 at 16:43