The issue of Imgur images not rendering on a Discourse forum is caused by the server being rate limited by Imgur. winston-yallow reported that after importing 120k topics with images from Imgur, the images would initially render correctly but fail to load after reloading the page. pfaffman identified the issue as rate limiting by Imgur, which prevents the server from downloading the images.
winston-yallow explained that the server is making requests to Imgur to cache the images locally, and pfaffman suggested that this behavior can be turned off or worked around by using a proxy server or importing topics on a different machine and restoring the backup to production.
Oof, I see. This makes sense since before I ran into this, I did import 120k topics. So that must have fetched a lot of images from imgur.
Thanks for pointing this out, I simply thought the client does all image requests!
I find it interesting that the server does these requests, I assume it is to cache them locally in case the original disappears? I will look for ways to spread the process out a bit, so that the 120k posts get build over a longer period of time to prevent the server from being blacklisted or rate limited. I mean for this server it’s not a problem, it’s just on integration. But once I do the import on prod I’d like to prevent this
Unless you turn off the settings that enable this behavior.
So do the import on another machine and restore the backup to prod. A more complicated solution would be to contrive to have your server retrieve stuff via a proxy server.