Direct access to Google Drive file from HTML

21 views
Skip to first unread message

Dan Hinsley

unread,
Feb 1, 2026, 3:37:34 AM (4 days ago) Feb 1
to Google Apps Script Community
I found a lot of references that say how to do that, but none work for me.  What I want to do is create an HTML  img tag that references a file on my google drive.  One set of posts says to use:

<img src="drive.google.com/uc?id=fileid" alt="xxx">

but another says that google no longer supports this, so you need to use:

<img src="https://lh3.googleusercontent.com/d/fileid" alt="Image Description">

But neither works for me.  I know I'm doing something stupid, but I just can't figure it out.  This has to be a common thing to want to do, can anyone point me in the right direction?

yaşar script

unread,
Feb 1, 2026, 4:00:24 AM (3 days ago) Feb 1
to google-apps-sc...@googlegroups.com

1 Şub 2026 Paz 11:37 tarihinde Dan Hinsley <webs...@danhinsley.com> şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/3c90bd47-a4e5-4ed5-8da9-68d84211030bn%40googlegroups.com.

Laurie Nason

unread,
Feb 1, 2026, 4:13:37 AM (3 days ago) Feb 1
to google-apps-sc...@googlegroups.com
And put in your image fileid
However - the image itself needs to have permission for anyone on the internet to view (I believe) in order to show it on a web page or as in my case in an appsheet app.
L

--

Adi Ofer

unread,
Feb 2, 2026, 12:43:10 AM (3 days ago) Feb 2
to Google Apps Script Community
Adding to what Laurie wrote: the "sz=w" parameter can be used to control the size of the image returned. E.g. in Laurie's example URL the requested returned size is 1000 pixels.

HTH.
Reply all
Reply to author
Forward
0 new messages