# Issue with topic/posts images

**URL:** https://meta.discourse.org/t/issue-with-topic-posts-images/283875
**Category:** Support
**Created:** [October 30, 2023, 6:50am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875 "2023-10-30T06:50:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [October 30, 2023, 6:50am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/1 "2023-10-30T06:50:44Z")

</div>

Hello all,

For quite some time now I am trying to fix weird issue(s):

1. Topic image stopped being generated.

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

1. Image inside topics/posts are not clickable anymore. (click to enlarge)

I’ve tried all possible configs I can think of, nothing seems to work.  
I tried safe mod, the issue still occurs there.  
Nothing useful to be found in logs as well.

Any idea how to fix it?  
My website is [https://cybernative.ai/](https://cybernative.ai/)

Also, “Convert remote (hotlinked) images to local images by downloading them” doesn’t seem to work as well.

It does work (topic image preview) when I just insert image URL (not from my website).

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [October 30, 2023, 11:10am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/2 "2023-10-30T11:10:04Z")

</div>

Hello 👋

> **Never mind this, I just wrote this before I checked raw**
>
> Can you check the following site settings?
> 
> `max image width` default value: 690  
> `max image height` default value: 500  
> `create thumbnails` default value: ON
> 
> If you changed these settings before than it won’t affect the existing uploads so you have to do it _manually_.  
> If these settings are correct then you can instant check it with Rebuild HTML on the actual posts. Or try to upload a new image.  
> [Rebuilding HTML on posts or topics](https://meta.discourse.org/t/rebuild-html-on-posts-or-topics/260993)
> 
> If the thumbnail is generated correctly after these then you can bulk rebake the all posts.
> 
> ```plaintext
> cd /var/discourse/
> ./launcher enter app
> 
> ```
> 
> `rake posts:rebake`

So I just checked your posts raw version. It looks like these images are added in composer with static HTML code. `<img src"..." alt="...">`. So these are not uploaded by using the default upload flow and it won’t generate thumbnail.

Did you try to just drag and drop image in composer or use the upload button?

However… Can you share more information about your setup? I see you are using Cloudflare which can cause issues depends on your setup. e.g. rocket loader usually break things… The uploads goes to local or S3? etc…

Is there any error in browser console when you upload an image?

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [October 30, 2023, 6:36pm UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/3 "2023-10-30T18:36:50Z")

</div>

Hey @Don, thank you for your response.

All mentioned settings are set to default:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/7/0/87057effdb0f308cf9a5e2095fc0c5781ad9df94.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/7/7/3/773270c41e2100281dad7c3bedd05247ea0a51b6.png)

Yes, images are inserted with static html as it was all the time, it did generate thumbnail before. (I use API to upload image to website then use that URL to insert)

The thumbnail is NOT generated even when I upload image via composer.  
This was uploaded via composer - [https://cybernative.ai/t/test-of-images-here/3458](https://cybernative.ai/t/test-of-images-here/3458)

None of my CDN/S3 setup changed, everything used to work before.

Speaking of my setup, I have somewhat weird bypass of custom CDN URL error (https caused) by using S3 replication to another bucket. It is slower, but working.

I will check browser console, but the images are uploaded fine, they just are not clickable/thumbnailed. **Checked browser console, nothing.**

Respectfully,  
Byte

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [November 2, 2023, 12:31am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/5 "2023-11-02T00:31:40Z")

</div>

> [@Don](#):
>
> So I just checked your posts raw version. It looks like these images are added in composer with static HTML code. `<img src"..." alt="...">`. So these are not uploaded by using the default upload flow and it won’t generate thumbnail.

I’ve modified my posting script to use default-like workflow, unfortunately, it does not work.

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [November 17, 2023, 5:54pm UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/7 "2023-11-17T17:54:31Z")

</div>

Any idea what else should I check?

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [November 24, 2023, 12:44am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/8 "2023-11-24T00:44:10Z")

</div>

Somehow fixed:

1. disable s3 uploads for backup.
2. restore from backup.
3. rebake posts, keep s3 uploads disabled.  
~ it generates thumbnails slowly.
4. My TODO: enable s3 uploads & run

```plaintext
rake uploads:migrate_to_s3
rake posts:rebake_uncooked_posts

```

Still playing around final solution, it just works sometimes until it doesn’t

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [November 24, 2023, 9:40pm UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/9 "2023-11-24T21:40:24Z")

</div>

Ok it stops working on enabling s3 uploads. I think the issue might be S3 replication to another bucket that has Cloudflare CDN. I implemented this weird solution because Discourse did not allow dots in S3, preventing me from doing it the right way.

I think it will be great if Discourse used non-cdn S3 URL to download/crop/manipulate/thumbnail images.  
My delay due to replication might be preventing it from working???

Struggle continues…

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [November 28, 2023, 4:33am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/10 "2023-11-28T04:33:32Z")

</div>

Does not work, going to switch my CDN to CloudFront since Discourse does not allow dots in bucket name and therefore Cloudflare.

---

<div class="post-metadata">

### Author: ![CyberNativeAI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cybernativeai/32/336487_2.png) [@CyberNativeAI](https://meta.discourse.org/u/CyberNativeAI)
#### Post date: [December 6, 2023, 2:38am UTC](https://meta.discourse.org/t/issue-with-topic-posts-images/283875/11 "2023-12-06T02:38:21Z")

</div>

idk, now I use CloudFront and found the single issue - “Enable S3 Setting”.  
It works besides thumbnails and images being “clickable”.  
Thumbnails is a big lose for me.
