# Inserting images into text fields

Images can currently only be inserted into text fields of CMS elements with a little "trick". We explain how this works in these instructions.

1. Open the administration of your shop
2. **Media Manager**
   1. Switch to the **Media Manager** via the main navigation ("Content" => "Shopping Experiences")
   2. Browse for the desired image
   3. Now copy the path to the image to the clipboard by clicking on "**Copy Link**" (1, 2)
3. **HTML code**
   * To insert the image as an HTML element in a text field, you must insert the path in a corresponding HTML code
   * Use the following example for this: `<img src="..." alt="...">`
     * Replace the ellipsis in the `src` tag with the image path
     * Replace the ellipsis in the tag `alt` with a short description of the image
4. **Shopping Experience Management**
   1. Switch to Shopping Experience Management via the main navigation ("Content" => "Shopping Experiences")
   2. Open the desired CMS layout
   3. Click on the ![](/files/60vRoZ5FAhYNJAhWNQQT) "gear" icon to configure the desired CMS element
   4. The pop-up "Element settings" will open
   5. Click on the ![](/files/WQSjQWME282p4X4Xz7r8) "code" icon to switch to HTML mode (3)
   6. Insert the HTML code created above at the desired position
   7. Wait a moment until the HTML Sanitizer of Shopware 6 has checked the code
   8. Save your changes

You have now inserted an image into a text field.

#### Screenshots

<div><figure><img src="/files/1LBsyVvwIau5vv2z3XKU" alt=""><figcaption></figcaption></figure> <figure><img src="/files/g6QBgS3mSQdPWMMoD2JJ" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Note**: If an image is missing in the Storefront, the path to the image has probably changed (e.g. by renaming or moving it). Just correct the path by repeating the above steps.
{% endhint %}

#### Code example

```
<img src="..." alt="...">
```

***

## Further information

You can find more information about inserting HTML code and the Shopware 6 HTML Sanitizer in the following article:

{% content-ref url="/pages/YKQeSRU8xzfednULhSbo" %}
[HTML code](/knowledge-base/basic-knowledge/html-code.md)
{% endcontent-ref %}


---

# 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://knowledge.themeware.design/knowledge-base/shopware/configuration/shopping-experiences/inserting-images-into-text-fields.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.
