# Images Broken in topic

**URL:** https://meta.discourse.org/t/images-broken-in-topic/106138
**Category:** Bug
**Created:** [January 10, 2019, 12:43am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138 "2019-01-10T00:43:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [January 10, 2019, 12:43am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/1 "2019-01-10T00:43:36Z")

</div>

After some update, I noticed that one of our most important topic has broken images.

 ![07%20AM](https://global.discourse-cdn.com/meta/original/3X/7/5/75e39d40a197c88e4c53529cfc304e15a2034b46.png)  
In the console log, it says that the server responded with a 404 error  
 ![59%20AM](https://global.discourse-cdn.com/meta/original/3X/4/5/45217f81662588dc084fd051e8e5901280ec4eb0.png)  
But when I click on the image, it loads just fine.

---

<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: [January 10, 2019, 1:34am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/2 "2019-01-10T01:34:15Z")

</div>

Can you share the URL to the topic please?

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [January 10, 2019, 1:35am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/3 "2019-01-10T01:35:16Z")

</div>

Here it is: [[Essentials] How To Post/Format Your Code Correctly -](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521)

---

<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: [January 10, 2019, 2:19am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/4 "2019-01-10T02:19:12Z")

</div>

Any thoughts @tgxworld?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [January 10, 2019, 9:06am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/5 "2019-01-10T09:06:25Z")

</div>

Bumping `OptimizedImage::VERSION` is apparently not that safe. This was done recently in

[https://github.com/discourse/discourse/commit/570877da3c39707c2101c3510fab1509fb8ba3e2](https://github.com/discourse/discourse/commit/570877da3c39707c2101c3510fab1509fb8ba3e2)

What happened here is that the user used the following URL in the post:

[https://discourse-cdn-sjc1.com/business6/uploads/codecombat/optimized/2X/0/03e091050fe4eed8c0076eee4ab979e171ba14c3\_1\_690x267.jpg](https://discourse-cdn-sjc1.com/business6/uploads/codecombat/optimized/2X/0/03e091050fe4eed8c0076eee4ab979e171ba14c3_1_690x267.jpg)

Note how the optimized image version is included as `_1_` in the URL. If I change that to `_2_`, the image loads properly.

 ![](https://global.discourse-cdn.com/meta/original/3X/6/5/659bf36aadd7a89cc8c9965e1b16dd72391c0e4d.jpeg)

---

<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: [January 10, 2019, 10:40am UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/6 "2019-01-10T10:40:12Z")

</div>

I am not sure I want to fix this… people are not meant to be directly copying these kind of URLs around. We can make a redirect path… I guess… like we do for avatars, but it feels like such an edge case and not a great practice anyway.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [January 26, 2019, 8:20pm UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/15 "2019-01-26T20:20:40Z")

</div>

It’s fixed. Now if you copy-paste/quote a optimized image in post then it will be converted to proper image markdown with original image URL. I think this will stop 75% optimized image urls usage.

Anyway if you explicitly copied a optimized image url (by right clicking) and used in a post (not html pasting) then it will not get converted. In this case we may need to replace it in cooked post process job. Similar issue will happen to optimized image url oneboxes too.

[https://github.com/discourse/discourse/commit/7e4edcfae8a3c0e664b836ee7c5f28b47853a2f8](https://github.com/discourse/discourse/commit/7e4edcfae8a3c0e664b836ee7c5f28b47853a2f8)

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [February 6, 2019, 2:15pm UTC](https://meta.discourse.org/t/images-broken-in-topic/106138/16 "2019-02-06T14:15:07Z")

</div>


