# markdown: Add Support for HTML \`img\` tags in text \(\#38107\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e946a06efe06c76b7e32c2f96d3ce98f04159b95

Requested commit: e946a06efe06c76b7e32c2f96d3ce98f04159b95

Commit: e946a06efe06c76b7e32c2f96d3ce98f04159b95

Tree: cd55be7cd41871073e49fb86c5c04f0267ebd667

Author: Remco Smits

Committer: GitHub

## Message

```
markdown: Add Support for HTML `img` tags in text (#38107)

Re-adds: https://github.com/zed-industries/zed/pull/37264

This PR re-adds basic support for showing HTML images, without touching
the display mode for images.
The initial PR changed the `div().flex().flex_col()` to
`h_flex().flex_wrap()` but this broke the text wrapping in almost all
cases.

**Note**: This does not add support for showing the images inline,
because we haven't figured out how they correctly do this.
I'm working on adding the CSS `inline` display feature support to taffy
that hopefully allows us to correctly show images/other elements inline
without breaking the text wrapping.

**Before (nightly) and after (dev) for the README file inside Zed.
(nothing has changed, which is good)**
<img width="3440" height="1380" alt="Screenshot 2025-09-13 at 12 49 08"
src="https://github.com/user-attachments/assets/9cbdcb07-dbe9-4236-9d20-e59acc0e955e"
/>

**Result**
<img width="1717" height="1314" alt="Screenshot 2025-09-13 at 12 51 54"
src="https://github.com/user-attachments/assets/1c0f8507-c63d-472e-8e82-a654a63f7153"
/>

cc @SomeoneToIgnore

Release Notes:

- markdown preview: Added support for HTML `img` tags inside paragraphs
```

## Parents

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

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