Show an Image from Google Drive in your AI2 app

Google Drive doesn’t directly provide a properly linked url to a file stored there, you have to edit the shared url yourself in order for the file to display, or download for outside of google drive.

  • Ensure the image file you want is shared as “Anyone with the link” or “Public on the web”
  • Get the sharing link:
https://drive.google.com/open?id=1_NPfCfgpq75RWAyKl8asKQU3hcnjUu4e
  • Replace “open?” with “uc?export=download&
  • Your url should now look like this:


https://drive.google.com/uc?export=download&id=1_NPfCfgpq75RWAyKl8asKQU3hcnjUu4e
  • Your image should now display. Just using the link in the browser address bar may offer a download, if this is an issues replace “download” with “view
  • The above edited link displayed:

This may also work with just uc?id=

https://drive.google.com/uc?id=1_NPfCfgpq75RWAyKl8asKQU3hcnjUu4e