# Including images

You can include images by adding them to a text cell, using the appropriate Markdown syntax.&#x20;

<figure><img src="https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2FvCrZdl8ipuj0O7F8zz6Z%2F20221208_images.png?alt=media&#x26;token=aba163a2-b5e2-4d63-b1e3-56f811ad0943" alt=""><figcaption><p>Example of adding images</p></figcaption></figure>

### Include an image on your computer

There are several ways to do this:

* In a text cell, click the ![](https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2Fps7Pinf8rQnXjwySsf6V%2Fimage.png?alt=media\&token=96af8b99-3ce3-4d2a-816c-9280c73014e0)icon and select the file from your filesystem. The image will be uploaded to your workbook filesystem, and the required markdown syntax to display the image will be added where your cursor is.
* Copy and paste
  * Copy the image on your computer
    * On Windows, you can use `Ctrl` + `C` for this.
    * On Mac, you can use `Cmd` + `C` .
  * Paste the image into a text cell in your notebook
    * On Mac, you can use `Cmd` + `V` .
    * On Windows, you can use `Ctrl` + `V` for this.
  * The image will be uploaded to your workbook filesystem, and the required markdown syntax to display the image will be added where your cursor is.
* Drag and drop the image on your computer into the text cell that you want to contain the image. The image will be uploaded to your workbook filesystem, and the required markdown syntax to display the image will be added where your cursor is.
* Manually upload the file and point to it in the text cell:
  * Open the file browser from the menu bar: "File > Show workbook files"&#x20;
  * Upload the image you want to include. The filename cannot contain spaces. If it does, change the filename using the rename functionality.
  * In the text cell, add `![my image caption](my_image.png)` (in this example, the filename of the image that is being included is `my_image.png`).

### Include a screenshot from your clipboard

You can easily make screenshots and add them to your notebook:

* Take the screenshot and copy it to your clipboard.
  * On Windows, you can use `Windows` + `Shift` + `S` for this.
  * On Mac, you can use `Cmd` + `Ctrl` + `Shift` + `4` for this.
* Paste the screenshot into your text cell
  * On Windows, you can use `Ctrl` + `V` for this.
  * On Mac, you can use `Cmd` + `V` for this.

The screenshot will be uploaded to your workbook files, and the required markdown syntax to display the image will be added where your cursor is.

### Include an image that in your workbook

If you already have an image file in your workbook, and want to display that in your notebook, add `![my image caption](my_image.png)` to a text cell. In this example, the filename of the image that is being included is `my_image.png`. Note that the filename should not contain spaces for this to work!

### Include image from a URL

In a text cell, add the following text (in this example, the image is available on <https://picsum.photos/200>):

```
![a random image](https://picsum.photos/200)
```

{% hint style="warning" %}
Using the `<img>` HTML element inside a text cell to include an image will work in the editor, but the image will not render correctly in a publication. This is a limitation we're planning to fix.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://datalab-docs.datacamp.com/work/text-cell/including-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
