# Imagens não são carregadas bem em tabelas por causa do símbolo de barra reta

**URL:** <https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063>\
**Category:** Support\
**Created:** [Abril 24, 2018, 2:10pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063 "2018-04-24T14:10:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![biminiroad](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@biminiroad](https://meta.discourse.org/u/biminiroad)\
**Post date:** [Abril 24, 2018, 2:10pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/1 "2018-04-24T14:10:49Z")

</div>

Our forum uses tables to describe the function of digital synthesizer modules. In the first column, we use a picture. Because Discourse inserts a `|` between the file name and resolution, it breaks the link to the picture when using it in a column.

The solution is you have to delete the `|` symbol. Not a big deal, but also not intuitive for beginners.

```
Meter | Displays
---|---
![Meter-Pattern|108x108](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png) | `Pattern`

```

| Meter | Displays |
| --- | --- |
| ![Meter-Pattern | 108x108](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png) |

### vs.

```
Meter | Displays
---|---
![Meter-Pattern108x108](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png) | `Pattern`

```

| Meter | Displays |
| --- | --- |
| ![Meter-Pattern108x108](https://global.discourse-cdn.com/meta/original/3X/4/3/438d581062abd16bfc5abb7871724e40fe3bc902.png) | `Pattern` |

Thanks!

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Abril 24, 2018, 2:46pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/2 "2018-04-24T14:46:43Z")

</div>

Looks like the standard escape character (`\`) works:

```
Meter | Displays
---|---
![Meter-Pattern\|108x108](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png) | `Pattern`

```

| Meter | Displays |
| --- | --- |
| ![Meter-Pattern](https://global.discourse-cdn.com/meta/original/3X/4/3/438d581062abd16bfc5abb7871724e40fe3bc902.png) | `Pattern` |

---

<div class="post-metadata">

**Author:** ![biminiroad](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@biminiroad](https://meta.discourse.org/u/biminiroad)\
**Post date:** [Abril 24, 2018, 2:49pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/3 "2018-04-24T14:49:22Z")

</div>

Sure, but you can also just delete the `|` as well. I’m personally not super versed in code so I had to puzzle through this at first.

Perhaps it’s not worth changing, I just thought maybe no one was really using pictures in tables and no one had come across this before. Not a big deal, I made a note of it on a tutorial about tables on our forum.

Thanks!

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Abril 24, 2018, 2:50pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/4 "2018-04-24T14:50:28Z")

</div>

> [@biminiroad](#):
>
> Sure, but you can also just delete the | as well. I’m personally not super versed in code so I had to puzzle through this at first.

But if you escape, you can actually resize the image:

| Meter | Displays |
| --- | --- |
| ![Meter-Pattern](https://global.discourse-cdn.com/meta/original/3X/4/3/438d581062abd16bfc5abb7871724e40fe3bc902.png) | `Pattern` |

```plaintext
Meter | Displays
---|---
![Meter-Pattern\|22x22](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png) | `Pattern`

```

note the escape in `\|22x22`

---

<div class="post-metadata">

**Author:** ![biminiroad](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@biminiroad](https://meta.discourse.org/u/biminiroad)\
**Post date:** [Abril 24, 2018, 2:50pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/5 "2018-04-24T14:50:32Z")

</div>

Maybe if I get this right, if the picture doesn’t load, it would say “Meter-Pattern” with your `\` solution and “Meter-Pattern108x108” if you did it by deleting the `|`?

---

<div class="post-metadata">

**Author:** ![biminiroad](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@biminiroad](https://meta.discourse.org/u/biminiroad)\
**Post date:** [Abril 24, 2018, 2:51pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/6 "2018-04-24T14:51:26Z")

</div>

Oooh, ok that’s great to know!

I will amend the advice on the forum to reflect this. Thanks a lot! I’m so psyched about the powers of this new forum. We were struggling on an old version of Vanilla that didn’t even have **bold** text. Yeesh.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [Abril 24, 2018, 10:05pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/7 "2018-04-24T22:05:19Z")

</div>

Very interesting edge case. Also note that part specifying the image dimensions is not strictly _required_ …

```
![Meter-Pattern](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png)
![Meter-Pattern|108x108](upload://9DAOKRFuJI7XfTYXxm9fsalRgbM.png)

```

.. though if omitted, it will cause some bouncing around in the topic as the browser has to manually verify the image dimensions.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [Abril 25, 2018, 11:29pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/8 "2018-04-25T23:29:05Z")

</div>

Agree, very interesting edge case. If we give up allowing `,` in title for images we can work around it but I wonder if this is a bug @Vitaly in the ordering of the table processing in the pipeline (maybe we should process images prior to tables)? (see OP)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [Setembro 17, 2020, 4:48pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/9 "2020-09-17T16:48:15Z")

</div>



---

<div class="post-metadata">

**Author:** ![Vitaly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vitaly/32/120475_2.png) [@Vitaly](https://meta.discourse.org/u/Vitaly)\
**Post date:** [Janeiro 7, 2022, 7:41am UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/10 "2022-01-07T07:41:15Z")

</div>

A tabela é analisada no nível do bloco. Ela não pode pular para o modo inline antes de detectar o layout das células. Portanto, ela só processa acentos graves e caracteres de escape.

Como as tabelas não fazem parte da especificação CommonMark, seguimos a especificação GFM. Você pode verificar que o GitHub se comporta da mesma maneira.

Em resumo: atualmente, todos os acentos graves e caracteres de barra vertical dentro de tabelas DEVEM ser escapados.

Se você desejar um comportamento diferente, precisará pedir aos caras do GitHub para atualizarem a especificação. Mas, pessoalmente, não tenho certeza se boas resoluções são possíveis no nível da especificação. Na minha opinião, este caso é muito específico, tem uma solução alternativa e não vale o esforço para ser gasto na reformulação da especificação/parsers.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [Janeiro 24, 2024, 12:00pm UTC](https://meta.discourse.org/t/pictures-dont-upload-well-into-tables-because-of-the-straight-bar-symbol/86063/11 "2024-01-24T12:00:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
