2

I have made several attempts to host an .ico file in Google Drive to use as a favicon for a Google Web App with no success. It just seems a little strange that there would be a .setFaviconUrl() method without a way to host .ico files.

So far I have tried:

  1. To link to a publicly shared .ico file on Google Drive with https://drive.google.com/uc?id=IMAGEURL
  2. Inserting an .ico file in a public Google Site and linking to the file's url

Both attempts give me the error:

The favicon icon image type is not supported.

Rubén
  • 34,714
  • 9
  • 70
  • 166
webstermath
  • 555
  • 1
  • 5
  • 14

1 Answers1

3

Took me a while to figure this out, if anyone needs this in the future.

You need to trick .setFaviconUrl() into thinking the image is a png without altering the link to the file. It seems like it checks the last 3 characters, so adding '&format=png' to the end of the download link was able to fix the issue for me.

Example: https://drive.google.com/uc?id=IMAGEID&export=download&format=png

Rubén
  • 34,714
  • 9
  • 70
  • 166
rcrj
  • 41
  • 1
  • 2
  • 4