# Fields - Images

You can inject logos, photos or images into your documents dynamically. It's possible using special field type (available in API mode using Base64 or Image URL).

### Adding a dynamic image to document template

You can add dynamic images to your templates using the "%" prefix. Examples: {%logo}, {%photo}, {%product}

![](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/bf7yPJ6CxG.png)

### Dynamic Image Size

By default image size will be the same as the size of the image that is being sent, however, in most cases, we would like set width/height manually or limit the maximum width or maximum height to keep the aspect ratio of the image (recommended). You can do that by using **"size"** and **"maxSize"** formatters and providing desired width and height.

Most of the time you need to set maxSize (otherwise your image could be cut or distorted)

**maxSize:\[width]:\[height]**

**size:\[width]:\[height]**

Examples:

```
{%image1}
{%image2 | size:250:100}
{%image3 | maxSize:300:500}
```

### How to pass a image using Form

Once you upload your document template that consists image tag ( e.g. {%logo} ) it will add an image type field to the template form. Users can select an image from the form and it will be rendered as part of the document

![](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/ejXSjZmu2z.png)

![](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/2kCurPl-GN.png)

### How to pass the image data using API

Once you upload your document template that consists image tag ( e.g. {%logo} ) it should be detected on the template overview page

![](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/ujeNpbptjU.png)

You can send images over API in two ways:

* **as image url (provide full url to image)**
* **as text using base64 format (see example below)**

Supported file types: **jpg, png, svg.**

Sample Small Image example will be added to your API section:

![Example: Passing image using image url](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/7U2HykS_o0.png)

![Example: Passing image as base64 text](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/FMyeLCfqQK.png)

### Passing dynamic list of images

If you would like to pass multiple images we recommend combining section and image field

Example:

![Template Example: Repeatable section "products" with "image" subfield](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/3KalSXAcbV.png)

![Generate a Dynamic number of images using Forms](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/8WngTQBx86.png)

![Generate a Dynamic number of images using API](https://tawk.link/61dd64c2b84f7301d32a6e5b/kb/attachments/OJgul4erpB.png)


---

# 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://docs.documentero.com/documentation/templates/fields-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.
