Images Broken in topic


(Chaboi 3000) #1

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


In the console log, it says that the server responded with a 404 error

But when I click on the image, it loads just fine.


(Jeff Atwood) #2

Can you share the URL to the topic please?


(Chaboi 3000) #3

Here it is: [Essentials] How To Post/Format Your Code Correctly - CodeCombat Discourse


(Jeff Atwood) #4

Any thoughts @tgxworld?


(Alan Tan) #5

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

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

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


(Sam Saffron) #6

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.


(Vinoth Kannan) #15

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.


(Daniela) closed #16