2

I am creating a google add-on toolbar with google script. The point of the app is for users to click on some pre-set images in the sidebar that will add them to the google doc. Is there any way to add images to the project folder?

Thanks!

  • What do you mean by "the project folder"? Is this related to the use of relative path in HTML? – Rubén Aug 29 '20 at 19:19
  • 1
    may be useful: https://stackoverflow.com/questions/20656803/using-base64-encoded-images-with-htmlservice-in-apps-script – Kos Aug 30 '20 at 20:44

1 Answers1

3

You can host image urls in your drive and link them using webContent link: <img src="[DRIVE webContent Link]">.

Alternatively, If the images are small, You can directly save the dataURIs in project folder.

TheMaster
  • 45,448
  • 6
  • 62
  • 85