# agent: Do not decode images during render \(\#56866\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8708a6fa749e0be85d378377369c539e9da244a7)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8708a6fa749e0be85d378377369c539e9da244a7

Requested commit: 8708a6fa749e0be85d378377369c539e9da244a7

Commit: 8708a6fa749e0be85d378377369c539e9da244a7

Tree: 37928fc4fcb7b3c8920d91d0caa48acfef7ac7db

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Do not decode images during render (#56866)

Turns out we were creating an ImageDecoder on every frame (added in
#46167) when a tool returned an image as output, because we were trying
to get its dimensions. That is now cached on `ContentBlock::Image`.

Release Notes:

- N/A
```

## Parents

- [b8dce970fa49fca372d1a86188715a5665dbe561](https://git.cafe/gitcafe/zed/commit/b8dce970fa49fca372d1a86188715a5665dbe561?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8708a6fa749e0be85d378377369c539e9da244a7?format=markdown)
