> For the complete documentation index, see [llms.txt](https://datalab-docs.datacamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://datalab-docs.datacamp.com/work/text-cell/including-images.md).

# 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&amp;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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
