Reputation: 714
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.
Upvotes: 40
Views: 24028
Reputation: 140
Not sure if it was again updated, this hack works for now
![test](https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fdrive.google.com/uc?id=<YOUR_ID>)
Upvotes: 1
Reputation: 1817
If you could not access any solution you can kind of use brute force:
![Alt text](<the link of the image>)
Upvotes: 1
Reputation: 41
The working format after Google changed the URL format. You need to get the image URL by getting the link after setting 'Anyone with the link' option.
![Example Image](https://drive.google.com/uc?id=1A1cNS98neP17g3jkpcbDGlrRik1QNNbm)
You need to provide the image id you're trying to embed as in the template format below.
![Example Image](https://drive.google.com/uc?id=<YOUR_IMAGE_ID>)
Upvotes: 1
Reputation: 346
image.jpg
to your Google Driveget link
button at the top right cornerAnyone with the link
<FILEID>
from the full link as shown (highlighted in blue) and click Done
. At the time of writing the shareable link takes the form:https://drive.google.com/file/d/``/view?usp=sharing
<FILEID>
and anchor tag as shown:<a href="https://drive.google.com/uc?export=view&id=<FILEID>"><img src="https://drive.google.com/uc?export=view&id=<FILEID>" style="width: 650px; max-width: 100%; height: auto" title="Click to enlarge picture" />
Note that the brackets '<' and '>' are not to be present with the file ID. The size of the image can be adjusted in the style attribute by adjusting the width and the height as needed. Clicking the rendered image will open it to its original size
Upvotes: 10
Reputation: 1415
For example, I have a.jpg
on the google drive.
Right click the image and click Share...
Click Advanced
and change the Who can access
option to Public on the web - Anyone on the Internet
link to share
and you will have something like
https://drive.google.com/file/d/<FILE_ID>/view?usp=sharing
![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.
Hope this helps.
Upvotes: 94