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.
After some update, I noticed that one of our most important topic has broken images.
Can you share the URL to the topic please?
Any thoughts @tgxworld?
Bumping OptimizedImage::VERSION
is apparently not that safe. This was done recently in
https://github.com/discourse/discourse/commit/570877da3c39707c2101c3510fab1509fb8ba3e2
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.
https://github.com/discourse/discourse/commit/7e4edcfae8a3c0e664b836ee7c5f28b47853a2f8