AakeJon
AakeJon

Reputation: 31

How to add pictures in colab text

I have used Jupyter notebook before and there is no problem to add pictures in the text cells.

In Colab, I have tried all the different ways I can come up with and I have searched the web. I have found a lot of solutions but none work for me. I think that the format of the downloadable link differs from the suggested solutions I have found. I have tried to modify the links in different ways but nothing seems to work.

Upvotes: 1

Views: 4472

Answers (2)

AakeJon
AakeJon

Reputation: 31

I Found this in stack overflow: Insert Image in Google Colab Text Cell

I have uploaded my image to Google drive. If I right click the image I can select "Get Link". I think that one shall make the link "Open". Click "Copy link" and return to the markdown cell.
Where you want the image positioned, write "![](https://drive.google.com/uc?id=" then Ctrl + V to add the copied link, but delete all but the bold code as below : "https://drive.google.com/file/d/1CDIZwkVNiKNmaskHPwnCFTkt-4_RxIhP/view?usp=sharing" The resulting image link should look something like this: "![ ] (https://drive.google.com/uc?id=1CDIZwkVNiKNmaskHPwnCFTkt-4_RxIhP)" (Sorry for my English)

Upvotes: 1

bhucho
bhucho

Reputation: 3420

It is only just about adding a !. Let me give an example,

  1. Add a link. Add a link
  2. Paste Image link enter image description here
  3. Then put ! before link text.(eg ![link text](https://i.example.com/e7e8ea16d242676.png)) enter image description here

Upvotes: 1

Related Questions