question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embed image from Google Drive

See original GitHub issue

I’m trying to embed an explanatory image in a markdown cell. At the top of the cell there’s an ‘Insert image’ button that puts the code ![alt text](https://) into the cell. It works for images hosted on the web, like for example from Wikimedia Commons. On Google Drive you can right-click on a file and select ‘Get shareable link’ which gives you a link using which anyone can view the file (like say an image file). But this link can’t be used to display an image in a Colab markdown cell. I’m using Google Chrome.

Example notebook: https://colab.research.google.com/drive/19Qe70fDD2XUP8LdWYnUQuUko5oT98Euy

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
bloiscommented, Dec 2, 2019

I was able to get a photo from Drive working by:

  1. Upload the image to Drive.
  2. Right-click on the file in Drive, choose ‘Get sharable link’.

The URL should look like: https://drive.google.com/open?id=XXXXXX

Then grab the ID from that URL then for the URL in the notebook, use: http://drive.google.com/uc?export=view&id=XXXXXX

2reactions
belicommented, Dec 3, 2019

Un-blocking third party cookies made the images appear for me - those with ‘open?id’ replaced with ‘uc?id’ and with ‘uc?export=view&id’. The change is immediate, without having to reload. I’m on Google Chrome.

Apologies, and thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embed Google Drive Images in your Website and Emails
How Embed Works? ... Go to drive.google.com, right-click any image file, and choose Get Link to get a shareable link of that image....
Read more >
Embed public google drive image into a html so it is viewable ...
Google Drive has offered the official feature to create an embedding link. 1) Open the preview page of public image,. 2) Click the...
Read more >
How do I display images from Google Drive on a website?
Example of Embedding a Google Drive Image · Open Drive at drive.google.com and select a file. · Click the Share button at the...
Read more >
Embedding an Image from Google Drive
Embedding an Image from Google Drive · Find the Image ID, and · Insert the image ID into an embed link ...
Read more >
Embedding or sharing a image or photo uploaded to Google ...
You'll need to grab the ID of the image. Easiest way on the desktop is to right click the file, dive into the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found