Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Image to GitHub Readme.md from Google Drive

I have the image in Drive, How could it be added to the Readme.md so as to display the image in readme. I had tried with the shared link, but it isn't working.

like image 317
GokulDAS027 Avatar asked Aug 28 '18 17:08

GokulDAS027


People also ask

Can I embed images from Google Drive?

Go to drive.google.com, right-click any image file, and choose Get Link to get a shareable link of that image. Make sure that the access is set to Anyone on the internet with this link can view. Paste that file link in the box below to generate the HTML embed code.

How do I embed an image in markdown?

Markdown Monster makes this process very easy — simply copy an image to the clipboard and then paste. MM will prompt to save the file for you (or you can embed it into the document as base64 as well) and then embed the resulting — hopefully relative — link to the image file.


1 Answers

For example, I have a.jpg on the google drive.

  1. Right click the image and click Share...

  2. Click Advanced and change the Who can access option to Public on the web - Anyone on the Internet

  3. Copy the link to share and you will have something like

    https://drive.google.com/file/d/<FILE_ID>/view?usp=sharing

  4. Copy the <FILE_ID> to make a link like this:

    https://drive.google.com/uc?export=view&id=<FILE_ID>

  5. Insert image in Markdown as ususal using the link from step 4.
    For example: ![image](https://drive.google.com/uc?export=view&id=<FILE_ID>)

Example: I have this octocat image in google, and its file id is 1913oZeBZPBNiUuk8gu3ZSbLBA2l_VQtG. You can try ![image](https://drive.google.com/uc?export=view&id=1913oZeBZPBNiUuk8gu3ZSbLBA2l_VQtG) in your markdown file or even in this answer.

image

Hope this helps.

like image 182
Echan Avatar answered Sep 20 '22 04:09

Echan