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:

  1. Find the Image ID, and
  2. Insert the image ID into an embed link

Finding Image ID

To find the ID of an image file:

  1. Navigate to the file on your Drive
  2. Click the eye icon to Preview
  3. 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:


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 hello@codehs.com to learn more!

Did this answer your question?