Images breaking with rss polling

I’m relatively new to Discourse so hope this question is not duplicative or miscategorised. I am using the rss polling plugin to pull in rss stories and create discussion posts. I’m finding that after initially displaying correctly, images are later breaking, being replaced with code snippets like the one below:


It appears this is happening as Discourse attempts to cache a previously hot-linked remote image from the RSS feed. I am assuming something is going wrong in the downloading and storing of that image but don’t know how to debug.

Here’s an example of the before/after in the post’s version history:

Can anyone point me in the right direction?

Welcome to the Discourse community! The question has come up a few times, but it’s a legitimate issue. You can find details about the issue here: Fix broken images for posts created by the WP Discourse and RSS plugins. Details about the cause of the issue are in my first reply to that topic.

If possible, the best approach for dealing with the issue is to add the domain(s) that the images are being downloaded from to your Discourse disabled image download domains site setting. This will prevent Discourse from attempting to download the images. It is the process of downloading the remote images that causes them to break.

To fix the issue with existing posts that have broken images, edit the post to add an empty line above the markdown tag that has been created for the image. For example, if you see markup that looks like this:


edit the post to change it to:


1 Like

Thank you, Simon. That’s great.

Is there a reason Discourse can’t download these images locally? Hot-linking from the rss feed is quite brittle as a solution.

Edit: I’m also finding that if I edit the posts to fix the broken image it reverts back a few minutes later! I’ve added both image domains that I can see to the exception list but to no avail.

Discourse can download the images, the problem is that when Discourse downloads a remote image, it creates a markdown tag for the image. If a markdown upload tag is wrapped in HTML tags, you will get a broken image link. In addition to the topic that I linked to, there is also a bug report about the issue here: Markdown rendering issue with image surrounded with HTML.

Yes, it could be difficult to know ahead of time what domains images from an RSS feed will be served from.

Can you double check to make sure that the correct domains have been added to your disabled image download domains site setting? I would expect this approach to work, but it may be that once Discourse has downloaded the image it will keep using the downloaded image even if the image’s domain has been added to the disabled image download domains setting. If that is the case, you could try deleting the topic to allow it to be recreated the next time that Discourse polls the RSS feed. Let me know if you can’t get this to work.

Thanks, Simon.

I’m not sure what I’m doing wrong but even after deleting the topics they return with the same issue. An example image URL is and so I’ve added to the disabled image download domains setting. I’ve also added which is the domain the used in the raw RSS feed (looks to 301 to this windows bucket).

Is there a more final way to delete a topic that I need to try to ensure this is not a cache at work?

1 Like