# Markdown rendering issue with image surrounded with HTML

**URL:** <https://meta.discourse.org/t/markdown-rendering-issue-with-image-surrounded-with-html/152801>\
**Category:** Bug\
**Created:** [26 במאי,‏ 2020,‏ 5:21pm UTC](https://meta.discourse.org/t/markdown-rendering-issue-with-image-surrounded-with-html/152801 "2020-05-26T17:21:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [26 במאי,‏ 2020,‏ 5:21pm UTC](https://meta.discourse.org/t/markdown-rendering-issue-with-image-surrounded-with-html/152801/1 "2020-05-26T17:21:21Z")

</div>

Related to [Thumbnail generation & markdown rendering issue](https://meta.discourse.org/t/thumbnail-generation-markdown-rendering-issue/152701)

When discourse downloads and replaces an image HTML with its markdown syntax – in our context, this results as:

```plaintext
[...]<a href="<link_here>" target="_blank">![|150x150](upload://l0iarnA6SPVAyJN5l7pnQxZnPvE.jpeg)</a>[...]

```

Discourse is unable to render the image

> **Image**
>
> ![image](https://global.discourse-cdn.com/meta/original/3X/5/9/59705a7de7ccc6f376c23844ee5c121efa0ada54.png)

To fix the issue, you need at least an empty line above:

```plaintext
[...]<a href="<link_here>" target="_blank">

![|150x150](upload://l0iarnA6SPVAyJN5l7pnQxZnPvE.jpeg)</a>[...]

```

> **Image**
>
> ![image](https://global.discourse-cdn.com/meta/original/3X/c/5/c5afe64d4bcfce23251021c6a85a8d412ec5e094.png)

Would it be possible to allow rendering markdown image surrounded by HTML, please?

@david

---

_[View the full topic](https://meta.discourse.org/t/markdown-rendering-issue-with-image-surrounded-with-html/152801)._
