Just download remote images to local
is disabled.
Had it always been set? What if you rebuild html on the posts that have the imgur images?
Oh! And itās discourse thatās getting the error and not your local browser?
Yep.
It happens as early as in the post editor, when pasting an Imgur link it tries to create a Onebox in the post preview but fails with a oneboxed 429 error that Discourse injects into the post preview.
As I understand it, my Discourse server first tries to validate the naked image URL and hits Imgur, which in turn eventually rejected my serverās domain / IP because of many requests. Then Discourse fails to wrap the URL in <img>
tags because it couldnāt validate the image, and it just leaves the naked URL in the post.
As of now the problem seems to have resolved on my server, i.e. Imgur has removed the rate limit, for now. Iām sure it wonāt be the last time though, so this issue remains.
Ah! I see. Then I think you need a plugin, or maybe a theme component that will handle those images without sending the request.
hello, Iām using google translate to understand the conversation, but it wasnāt clear to me (maybe itās a translation without literal meaning) How did you solve the problem?
There is no solution yet. Imgur blocks Discourse from displaying the image preview, and Discourse does not properly handle that error and fails to create the proper HTML to display the image.
As a workaround:
What language is your native language so I can translate that part of the conversation?
iām not clear why you are implying Discourse is responsible for handling an error because Imgur is blocking images. this is an Imgur thing, not a discourse functional weakness or bug. it sounds like you may need a plug-in built to handle this if you need to have imgur photos.
Discourse should still generate valid HTML to display the image. Imgur throws a 429 error when the Discourse server tries to pull a preview of the image link, but Discourse treats it as if it were a 404 error. On my forum this image is not displayed with just the URL:
https://i.imgur.com/eHltaVt.jpeg
But the following HTML works to display the image:
<img src="https://i.imgur.com/eHltaVt.jpeg">
That is what Discourse should generate for the baked post even if it receives a 429 when the server hits the URL, and it should only leave the naked URL if it gets a 404 error.
This problem is still continuing to affect my Discourse forum.
@community-moderators Would it be possible to move this to bug , or copy the last post into a new topic? (Of course I can do that myself too if you think thatās best.)
That suggests that your server has been rate limited and canāt get images from imgur. Links to the images worry because they are retrieved by the user and not your server.
The server is indeed getting rate limited when it tests the Imgur link and tries to Onebox it. But thereās nothing preventing individual users from viewing it when the link is properly wrapped in <img>
tags. The problem is that Discourse is assuming that the link is not a viewable image for all users when in reality itās only a problem for the server, and itās just wrapping the Imgur URL in in <a>
tags.
Iām not sure it classifies as a bug though I understand the annoyance
If you have figured out that this is indeed the issue, I invite you to post a new topic with a proper description of the issue in feature and see how it goes
Thanks @Canapin .
digging out this one
We have the same issue with Imgur, embed not working.
In the composer preview, following error message appears:
Sorry, we were unable to generate a preview for this web page, because the web server returned an error code of 429. Instead of a preview, only a link will appear in your post.
example link: How To: Quickstop - FAQs & How-tos - pev.dev (scroll to bottom of first post)
Hi @drreen
Your post seemed to fit better in this topic, so Iāve moved it across.