r/GoogleAppsScript • u/Kobito84 • Nov 04 '25
Resolved Adding Google Drive Images to Google sites using Google Apps Scripts
I am having trouble getting images from Google Drive to show up on my Google Site using Google Apps scripts. Does anyone else have the same problem? I've tried the thumbnail way and the export way but both ways do not work.
https://drive.google.com/thumbnail?id=FILE_ID&sz=s4000
AND
https://drive.google.com/uc?export=view&id=FILE_ID
4
Upvotes
3
u/Repulsive_Cucumber86 Nov 04 '25
Try with that
https://lh3.googleusercontent.com/d/PUT_YOUR_IMG_ID_HERE
1
u/WicketTheQuerent Nov 04 '25
Editing a Google Site using Apps Script is impossible, but you could create an Apps Script web app to display a Drive image.
Could you please elaborate on your use case?
1
u/marcnotmark925 Nov 04 '25
It's been a couple years now since they deprecated the uc?export thing, for security issues or something. I'm not sure if there is another way to get a direct url for an image on GDrive, happy to hear if anyone else has found one though.