Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to images within google drive from a colab notebook

I would like to store image files on a drive and link to them from a collaboration notebook. Is this possible? For example.

google-drive/
  notebook.ipynb
  images/
    pic.jpg

Within notebook.ipynb markdown cell:

![Alternate Text](images/pic.jpg)
like image 567
Ian Danforth Avatar asked Dec 07 '22 15:12

Ian Danforth


1 Answers

Google always loses me in the details. That's where the devil is. Based on the previous answer, these are my steps to make an image sharable so it can be used in a notebook.

  1. In your Google Drive, create a public folder as follows: a. Create a new folder and name it Image, for instance. b. Right-click the folder just created and select Share from the drop-down menu. c. In the popup dialog window, click the Advanced link in the bottom right. d. In the section Who has access, select "Public on the web - Anyone on the Internet can find and view". e. Click the Done button.
  2. Store the image in the folder you just created.
  3. Right-click on the image, and from the drop-down menu select Share.
  4. Click the Copy link button. A link is copied in your clipboard.
  5. From the link, copy the long image ID made of numbers and letters.
  6. Replace imageID in the following URL: https://docs.google.com/uc?export=download&id= with the ID you copied in the previous step.
  7. Copy this URL in the markdown image tag such as:![test](https://docs.google.com/uc?export=download&id=mmXXDD123zDGV51twxSCGAAX23)
like image 122
docguy Avatar answered Jan 01 '23 09:01

docguy