Suddenly "image_url" : null in category JSON files

AI-generated summary

UnheardBatting317 reported an issue where category JSON files suddenly show "image_url" : null after switching PeerTube instances for video URLs in posts — despite previews displaying correctly. They tried adjusting settings, rebuilding HTML, and searching for solutions but found nothing relevant. They suspected the issue might stem from PeerTube’s thumbnail scraping permissions or Discourse’s thumbnail extraction mechanism. pfaffman agreed the problem likely lies with PeerTube’s configuration. Eventually, UnheardBatting317 resolved the issue by identifying a broken custom plugin responsible for thumbnail extraction — though they couldn’t edit their original post to reflect this. The forum runs Discourse 3.5.0.beta4-dev with Cloudflare, and the user has admin access. This was a self-resolved case after ruling out core Discourse or PeerTube misconfigurations.

Hi everyone,
I’m trying to solve an issue with missing images.

What’s the problem

  • We have a category with posts that contain video URLs (PeerTube instance).
  • The JSON contained "image_url" : ....
  • We switched to another PeerTube instance and replaced all the old URLs in the posts with the new ones.
  • The preview is shown, and everything looks okay; however, in the category JSON file → "image_url" : null.

What I’ve tried

  • I went through the settings
  • I searched online and also here; however, I found nothing useful for our case (also old - May 2020; this happened suddenly, so I suspect it’s on our side)
  • rebuild html for posts didn’t help either

Questions

  • How does Discourse actually extract thumbnails from these services? From what I’ve been able to find, it should be automatic.
  • Are there any settings I missed?
  • Do we have to do something on the PeerTube instance (is there some setting like “allow thumbnail scraping” or something like this? IDK PeerTube, just spitballing here)

Info

  • I have admin access to the forum
  • Discourse 3.5.0.beta4-dev
  • We are using Cloudflare

Thank you for any help or pointers you can give me.

That’s my guess.

We have found the problem. It was highly likely due to a custom plugin that extracted the thumbnail, but it has stopped working. Sorry for the long useless post.

(I can’t edit my own posts because … reasons.)