Images Broken in topic

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.

Can you share the URL to the topic please?

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

Any thoughts @tgxworld?

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:

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


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.


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.