# Single image \[grid\] works in preview but not in cooked

**URL:** https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768
**Category:** Bug
**Created:** [November 16, 2023, 6:50pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768 "2023-11-16T18:50:17Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 16, 2023, 6:50pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/1 "2023-11-16T18:50:17Z")

</div>

# Update

I’ve figured it out. The Bot is putting all images into a grid, but if there is only one image nothing is displayed.

 ![IMG_4958](https://global.discourse-cdn.com/meta/original/4X/5/f/7/5f7168583bec79877305d4e63c2775e39257da67.jpeg)

The image is successfully generated, but it does not display. Editing the post and previewing it shows the image, but it doesn’t actually show in the PM.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [November 16, 2023, 6:56pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/2 "2023-11-16T18:56:46Z")

</div>

Try clicking on the “generate image” dropdown.

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 16, 2023, 6:57pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/3 "2023-11-16T18:57:33Z")

</div>

That just shows the prompt for the image.

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [November 16, 2023, 7:20pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/4 "2023-11-16T19:20:07Z")

</div>

Sometimes the API will timeout, and no images will appear. You can check your logs for the specific message. 👍

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 16, 2023, 7:21pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/5 "2023-11-16T19:21:09Z")

</div>

The API is working, and the images are uploaded. If I click edit on the bot’s post the post preview shows the image. It just doesn’t display in the PM.

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 16, 2023, 7:26pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/6 "2023-11-16T19:26:48Z")

</div>

Actually, I’ve figured it out. The Bot is putting all images into a grid, but if there is only one image nothing is displayed.

---

<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: [November 17, 2023, 6:55am UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/10 "2023-11-17T06:55:21Z")

</div>

No repro here… A grid with 1 image works just fine:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/c/8/cc862e70d6ed515429a6af004bfac6f169681256.jpeg)

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 17, 2023, 7:11pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/11 "2023-11-17T19:11:34Z")

</div>

> [@sam](#):
>
> [  
> image1067×1189 136 KB  
> ](https://global.discourse-cdn.com/meta/original/4X/c/c/8/cc862e70d6ed515429a6af004bfac6f169681256.jpeg)

I will try updating to see if that fixes the issue. Is it possible that I have a configuration problem?

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 17, 2023, 7:29pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/12 "2023-11-17T19:29:36Z")

</div>

I have updated to the latest version, but the single images in grids still do not display.

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 17, 2023, 7:37pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/13 "2023-11-17T19:37:18Z")

</div>

As an example, this is the post and it’s actual HTML that is displayed in the browser:

```plaintext

<details>
  <summary>Generate image</summary>
  <p>
    Isometric TARDIS
  </p>
</details>

[GRID]
![Isometric TARDIS|512x512, 50%](upload://hzFPyqAeEQOZS5JROeSqfakzXzJ.jpeg)
[/GRID]

```

And the HTML:

```plaintext
<div class="topic-post clearfix regular"><div class="post-user-tip-shim">    
    <div>
<!----> </div>
  
</div><article id="post_8" aria-label="post #8 by @gpt3.5_bot" role="region" data-post-id="475" data-topic-id="268" data-user-id="-111" class="boxed onscreen-post"><span aria-hidden="true" tabindex="-1" class="tabLoc"></span><div class="row"><div class="topic-avatar"><div class="post-avatar"><a class="trigger-user-card main-avatar " href="/u/gpt3.5_bot" data-user-card="gpt3.5_bot" aria-hidden="true" tabindex="-1"><img alt="" width="48" height="48" src="/letter_avatar_proxy/v4/letter/g/ee59a6/48.png" aria-hidden="true" loading="lazy" tabindex="-1" class="avatar"></a></div></div><div class="topic-body clearfix"><div role="heading" aria-level="2" class="topic-meta-data"><div class="names trigger-user-card"><span class="first username staff admin moderator"><a href="/u/gpt3.5_bot" data-user-card="gpt3.5_bot" class="">gpt3.5_bot</a><span title="This user is a moderator" class="svg-icon-title"><svg class="fa d-icon d-icon-shield-alt svg-icon svg-node" aria-hidden="true"><use xlink:href="#shield-alt"></use></svg></span></span><span class="persona-flair"> Artist
</span></div><div class="post-infos"><div class="post-info edits"><button class="widget-button btn-flat heatmap-high btn-icon-text" title="post last edited on Nov 17, 2023 7:30 pm" aria-label="post edit history"><svg class="fa d-icon d-icon-pencil-alt svg-icon svg-node" aria-hidden="true"><use xlink:href="#pencil-alt"></use></svg><span class="d-button-label">1</span></button></div><div class="post-info post-date"><a class="widget-link post-date" href="/t/trumps-magical-transformation-from-businessman-to-wizard/268/8?u=jimmy" title="Post date"><span title="Nov 17, 2023 5:03 am" data-time="1700197421867" data-format="tiny" class="relative-date">15h</span></a></div><div class="read-state read" title="Post is unread"><svg class="fa d-icon d-icon-circle svg-icon svg-node" aria-hidden="true"><use xlink:href="#circle"></use></svg></div></div></div><div class="regular contents"><div class="cooked"><details>
  <summary>Generate image</summary>
  <p>
    Isometric TARDIS
  </p>
</details>
<div class="d-image-grid" data-disabled="true">
<p></p>
</div></div><section class="post-menu-area clearfix"><nav class="post-controls collapsed"><div class="discourse-reactions-actions can-toggle-reaction" id="discourse-reactions-actions-475-left" data-click-outside="true"><div class="discourse-reactions-picker"></div><div id="discourse-reactions-counter-475-left" data-click-outside="true"></div></div><div class="actions"><span class="extra-buttons"><button class="widget-button btn-flat btn btn-default cancel-streaming no-text btn-icon" title="Stop reply"><svg class="fa d-icon d-icon-pause svg-icon svg-node" aria-hidden="true"><use xlink:href="#pause"></use></svg></button></span><div class="discourse-reactions-actions can-toggle-reaction" id="discourse-reactions-actions-475-right" data-click-outside="true"><div class="discourse-reactions-picker" style="position: absolute; inset: auto auto 0px 0px; margin: 0px; transform: translate(512px, -28px);" data-popper-placement="top"></div><div title="Like this post" class="discourse-reactions-reaction-button"><button title="Like this post" class="btn-toggle-reaction-like btn-icon no-text reaction-button"><svg class="fa d-icon d-icon-far-heart svg-icon svg-node" aria-hidden="true"><use xlink:href="#far-heart"></use></svg></button></div></div><button class="widget-button btn-flat share no-text btn-icon" title="share a link to this post"><svg class="fa d-icon d-icon-d-post-share svg-icon svg-node" aria-hidden="true"><use xlink:href="#link"></use></svg></button><button class="widget-button btn-flat show-more-actions no-text btn-icon" title="show more"><svg class="fa d-icon d-icon-ellipsis-h svg-icon svg-node" aria-hidden="true"><use xlink:href="#ellipsis-h"></use></svg></button><button class="widget-button btn-flat reply create fade-out btn-icon-text" title="begin composing a reply to this post" aria-label="Reply to post #8 by @gpt3.5_bot"><svg class="fa d-icon d-icon-reply svg-icon svg-node" aria-hidden="true"><use xlink:href="#reply"></use></svg><span class="d-button-label">Reply</span></button></div></nav></section></div><section class="post-actions">
  </section><div class="post-links-container"></div></div></div></article><div class="widget-connector"> <!---->
</div></div>

```

As you can see, no actual image is in the generated HTML.

---

<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: [November 17, 2023, 8:54pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/14 "2023-11-17T20:54:51Z")

</div>

What happens when you re cook the post, add a letter to the bots post

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 18, 2023, 2:07pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/15 "2023-11-18T14:07:33Z")

</div>

Nothing happens even after a rebake or an edit.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 18, 2023, 3:15pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/16 "2023-11-18T15:15:27Z")

</div>

I can’t give you guys any help but telling that I get nothing too when there is just one single image generated.

> **HTML**
>
> ```plaintext
> <details>
> <summary>Luo kuva</summary>
> <p>
> A photograph of a cup of coffee
> </p>
> </details>
> <div class="d-image-grid">
> <p><img src="https://cdnfoorumi.katiska.eu/original/2X/0/0b0a30b47b96cc8581c6b1117112b1b1e4b85139.jpeg" alt="A photograph of a cup of coffee" data-base62-sha1="1zF5fyN9IUn8LDKGq0cQV79IIVH" width="256" height="256"></p>
> </div>
> 
> ```

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 18, 2023, 3:38pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/17 "2023-11-18T15:38:54Z")

</div>

Yours has an image tag in the HTML, although mine doesn’t.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 18, 2023, 3:42pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/18 "2023-11-18T15:42:42Z")

</div>

That’s true. But yet I have to generate two images to get those visible. That’s why I **believe** the issue is same.

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 18, 2023, 4:55pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/19 "2023-11-18T16:55:23Z")

</div>

It definitely seems similar. For now I just forked the plugin and removed the grid tag. I’m hoping for a permanent solution though, perhaps the bot could only use the grid for multiple images.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 18, 2023, 5:02pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/20 "2023-11-18T17:02:23Z")

</div>

Does that div come from the plugin or Stability? But Discourse is handling `d-image-grid`, right?

---

<div class="post-metadata">

### Author: ![JimmyHoke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimmyhoke/32/341886_2.png) [@JimmyHoke](https://meta.discourse.org/u/JimmyHoke)
#### Post date: [November 18, 2023, 9:59pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/21 "2023-11-18T21:59:32Z")

</div>

The plugin just makes a post with a grid tag and Discourse generates the HTML as far as I know. I’m not sure about the specifics behind the scenes.

---

<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: [November 19, 2023, 8:14pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/22 "2023-11-19T20:14:49Z")

</div>

What if you edit out the grid tag?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 19, 2023, 9:03pm UTC](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768/23 "2023-11-19T21:03:21Z")

</div>

Then it works. For me anyway.

[Next page](https://meta.discourse.org/t/single-image-grid-works-in-preview-but-not-in-cooked/285768.md?page=2)
