While creating assignment descriptions using CodeHS Create, sometimes you may want to insert an image from your Google Drive. Since 'Sharing' an image from Google Drive does not actually provide a direct link, there are a few more steps involved in finding a direct link that you can embed using Markdown:
Find the Image ID, and
Insert the image ID into an embed link
Finding Image ID
To find the ID of an image file:
Navigate to the file on your Drive
Click the eye icon to Preview
Click the three dots … and click Open in New Window:
In this new window's URL, the string of text after
is the ID of the image file.
For example, in the following URL:
This is the ID:
Insert into Embed Link
Now that you have the image file ID, you can create a direct link to the image that can be used in Markdown or HTML.
To create a Direct Link, start with this URL:
Using the above image ID example, the final URL would look like:
This is a direct link that you can use in HTML or Markdown.
Still have questions? Contact our team at email@example.com to learn more!