> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/formblock/_setimage.md).

# \_setImage

Sets the image that a Form Block will use.

### Parameter

#### id

The ID of the Form Block to be deleted.

### Example

```
FM_api('FormBlock_setImage',[
    'id'=>'30002',
    'Filedata'=>'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
    ]
);
```

### Results

#### On Success

```
{"ok":1,"now":1732458806,"img":"\/f\/92447\/formblocks\/30002.png"}
```

#### On Failure

If the "id" parameter is not set or has a value less than 1:

```
{"error":"invalid or missing parameter: id"}
```

If the "Filedata" parameter is not set:

```
{"error":"missing parameter: Filedata"}
```

If the "id" parameter does not match the ID of an existing Form Block:

```
{"error":"no such form block"}
```
